cga...@users.adullact.net
unread,May 31, 2024, 4:00:22 AMMay 31Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openmairie-...@googlegroups.com
Author: cgarcin
Date: 2024-05-31 10:00:19 +0200 (Fri, 31 May 2024)
New Revision: 1537
Added:
branches/10418/tests/data/pgsql/init_parametrage_profil.sql
Modified:
branches/10418/
branches/10418/HISTORY.txt
branches/10418/obj/election_unite.class.php
branches/10418/tests/030_animation.robot
branches/10418/tests/data/pgsql/install_tests.sql
Log:
chore(branch) : merge trunk
Index: branches/10418
===================================================================
--- branches/10418 2024-05-31 07:45:45 UTC (rev 1536)
+++ branches/10418 2024-05-31 08:00:19 UTC (rev 1537)
Property changes on: branches/10418
___________________________________________________________________
Modified: svn:mergeinfo
## -1,5 +1,6 ##
/branches/10380:1482-1510
/branches/10395:1490-1502
+/branches/10422:1529-1533
/branches/2.0.0-develop:1098-1107
/branches/2.0.0-develop-BV:713-732
/branches/2.0.0-develop-ajout-table:694-699
## -64,4 +65,5 ##
/branches/evo-9536-etat-prefecture-perimetre:1256-1275
/branches/evo-permissions:1153-1154
/branches/poc-optimize-election-mf-compute:1240-1286
-/branches/trunk-compat-php80:1468-1471
\ No newline at end of property
+/branches/trunk-compat-php80:1468-1471
+/trunk:1525-1536
\ No newline at end of property
Modified: branches/10418/HISTORY.txt
===================================================================
--- branches/10418/HISTORY.txt 2024-05-31 07:45:45 UTC (rev 1536)
+++ branches/10418/HISTORY.txt 2024-05-31 08:00:19 UTC (rev 1537)
@@ -4,7 +4,7 @@
2.3.1 (unreleased)
------------------
-* Aucun changement.
+* Correction : Transmission des résultats possible depuis le formulaire de saisie même si l'utilisateur n'a pas les droits. Ticket #10422.
2.3.0 (17/05/2024)
Modified: branches/10418/obj/election_unite.class.php
===================================================================
--- branches/10418/obj/election_unite.class.php 2024-05-31 07:45:45 UTC (rev 1536)
+++ branches/10418/obj/election_unite.class.php 2024-05-31 08:00:19 UTC (rev 1537)
@@ -304,6 +304,12 @@
$form->setType('envoi_web', "checkbox");
$form->setType('envoi_aff', "checkbox");
}
+ if (! $this->f->isAccredited("election_unite_publication_res_web")) {
+ $form->setType('envoi_web', "hidden");
+ }
+ if (! $this->f->isAccredited("election_unite_publication_res_aff")) {
+ $form->setType('envoi_aff', "hidden");
+ }
if ($this->calcul_auto_activee()) {
$form->setType('exprime', "hidden");
}
Modified: branches/10418/tests/030_animation.robot
===================================================================
--- branches/10418/tests/030_animation.robot 2024-05-31 07:45:45 UTC (rev 1536)
+++ branches/10418/tests/030_animation.robot 2024-05-31 08:00:19 UTC (rev 1537)
@@ -339,7 +339,56 @@
Message Should Contain ../aff/res/${id_election}/repartition_sieges.json envoyé
Le fichier doit exister ../aff/res/${id_election}/repartition_sieges.json
+Envoi des informations à l'affichage - permission d'envoi
+ [Documentation] Avec un profil dédié à la saisie des résultats et de la
+ ... participation, depuis le contextes des résultats et des centaines
+ ... vérifie que l'utilisateur ne peut pas déclencher l'envoi depuis le
+ ... formulaire et via les actions
+ # Arret de l'envoi automatique des résultats pour que les checkbox soient actives
+ &{election} = BuiltIn.Create Dictionary
+ ... publication_auto=false
+ Modifier election ${id_election} ${election}
+
+ # Utilisation d'un profil n'ayant les droits qu'en saisie
+ Depuis la page d'accueil saisie saisie
+ Depuis le contexte election ${id_election}
+
+ # RESULTATS
+ Click On Tab election_unite unité(s)
+ # Vérification de l'absence des actions de transmission
+ Click On Link 001 - bureau_1
+ Portlet Action Should Not Be In SubForm election_unite affichage
+ Portlet Action Should Not Be In SubForm election_unite web
+ # Dans le formulaire de saisie vérification de l'absence des checkbox de transmission
+ Click On SubForm Portlet Action election_unite modifier
+ Page Should Contain Element css=#envoi_aff
+ Element Should Not Be Visible css=#envoi_aff
+ Page Should Contain Element css=#envoi_web
+ Element Should Not Be Visible css=#envoi_web
+
+ # CENTAINES
+ &{values} = Create Dictionary
+ ... libelle=TST_030
+ ${id_centaine} = Ajouter centaine à l'élection ${values} ${id_election}
+ # Vérification de l'absence des actions de transmission
+ Click On Link xpath=//td[normalize-space(text()) = "001 - bureau_1"]//ancestor::tr/td[contains(@class, "icons")]/a
+ Portlet Action Should Not Be In SubForm election_unite affichage
+ Portlet Action Should Not Be In SubForm election_unite web
+ # Dans le formulaire de saisie vérification de l'absence des checkbox de transmission
+ Click On SubForm Portlet Action election_unite modifier
+ Page Should Contain Element css=#envoi_aff
+ Element Should Not Be Visible css=#envoi_aff
+ Page Should Contain Element css=#envoi_web
+ Element Should Not Be Visible css=#envoi_web
+
+
+ # Arret de l'envoi automatique des résultats pour que les checkbox soient actives
+ Depuis la page d'accueil admin admin
+ &{election} = BuiltIn.Create Dictionary
+ ... publication_auto=true
+ Modifier election ${id_election} ${election}
+
Affichage de l'animation
[Documentation] Test vérifiant que les éléments affichés correspondent
... aux éléments paramétrés. Vérifie également le fonctionnement de
Copied: branches/10418/tests/data/pgsql/init_parametrage_profil.sql (from rev 1536, trunk/tests/data/pgsql/init_parametrage_profil.sql)
===================================================================
--- branches/10418/tests/data/pgsql/init_parametrage_profil.sql (rev 0)
+++ branches/10418/tests/data/pgsql/init_parametrage_profil.sql 2024-05-31 08:00:19 UTC (rev 1537)
@@ -0,0 +1,40 @@
+-- ------------------------------------------------------------------------------
+-- Script d'initialisation du paramétrage.
+
+-- @package openresultat
+-- @version SVN : $Id$
+-- ------------------------------------------------------------------------------
+
+-- PROFIL
+INSERT INTO om_profil (om_profil, libelle, hierarchie)
+SELECT
+ nextval('om_profil_seq'),
+ 'saisie resultat et centaine',
+ 0
+WHERE NOT EXISTS (
+ SELECT om_profil
+ FROM om_profil
+ WHERE libelle = 'saisie resultat et centaine');
+
+-- PERMISSIONS
+INSERT INTO "om_droit" ("om_droit", "libelle", "om_profil") VALUES
+(nextval('om_droit_seq'), 'password', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'menu_application', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_tab', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_consulter', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_unite_tab', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_unite_consulter', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_unite_modifier', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_unite_overlay', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_unite_centaine_tab', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_unite_centaine_consulter', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_unite_centaine_modifier', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'election_unite_saisir_centaine', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'centaine_tab', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'centaine_ajouter', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'centaine_consulter', currval('om_profil_seq')),
+(nextval('om_droit_seq'), 'centaine_modifier', currval('om_profil_seq'));
+
+-- UTILISATEUR
+INSERT INTO om_utilisateur (om_utilisateur, nom, email, login, pwd, om_collectivite, om_type, om_profil) VALUES
+(nextval('om_utilisateur_seq'), 'saisie', 'sai...@saisie.saisie', 'saisie', md5('saisie'), 1, 'DB', currval('om_profil_seq'));
\ No newline at end of file
Modified: branches/10418/tests/data/pgsql/install_tests.sql
===================================================================
--- branches/10418/tests/data/pgsql/install_tests.sql 2024-05-31 07:45:45 UTC (rev 1536)
+++ branches/10418/tests/data/pgsql/install_tests.sql 2024-05-31 08:00:19 UTC (rev 1537)
@@ -14,6 +14,7 @@
--
SET search_path = :schema, public, pg_catalog;
--
+\i 'tests/data/pgsql/init_parametrage_profil.sql'
\i 'tests/data/pgsql/init_parametrage.sql'
\i 'tests/data/pgsql/init_parametrage_editions.sql'
\i 'tests/data/pgsql/init_data.sql'