From 4bbcb308a9ad4d31157afe24fff55a67c9c8d0bf Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 19 Oct 2023 17:29:21 +0200 Subject: [PATCH] Refactoring --- .../prenotazioni/profiles/default/rolemap.xml | 4 ---- .../prenotazioni_workflow/definition.xml | 24 +++++++++++++++++++ src/redturtle/prenotazioni/upgrades.py | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/redturtle/prenotazioni/profiles/default/rolemap.xml b/src/redturtle/prenotazioni/profiles/default/rolemap.xml index 5b8f7cf2..57a6571f 100644 --- a/src/redturtle/prenotazioni/profiles/default/rolemap.xml +++ b/src/redturtle/prenotazioni/profiles/default/rolemap.xml @@ -59,9 +59,5 @@ - - - - diff --git a/src/redturtle/prenotazioni/profiles/default/workflows/prenotazioni_workflow/definition.xml b/src/redturtle/prenotazioni/profiles/default/workflows/prenotazioni_workflow/definition.xml index e1e838db..2d5fcbb9 100644 --- a/src/redturtle/prenotazioni/profiles/default/workflows/prenotazioni_workflow/definition.xml +++ b/src/redturtle/prenotazioni/profiles/default/workflows/prenotazioni_workflow/definition.xml @@ -29,6 +29,12 @@ Reviewer Bookings Manager + + Editor + Manager + Reviewer + Bookings Manager + Fake initial state, immediately changed @@ -56,6 +62,12 @@ Reader Bookings Manager + + Editor + Manager + Reviewer + Bookings Manager + @@ -80,6 +92,12 @@ Reviewer Bookings Manager + + Editor + Manager + Reviewer + Bookings Manager + @@ -104,6 +122,12 @@ Reviewer Bookings Manager + + Editor + Manager + Reviewer + Bookings Manager + Conferma diff --git a/src/redturtle/prenotazioni/upgrades.py b/src/redturtle/prenotazioni/upgrades.py index 973c6fc4..14fddc7a 100644 --- a/src/redturtle/prenotazioni/upgrades.py +++ b/src/redturtle/prenotazioni/upgrades.py @@ -461,6 +461,6 @@ def to_1807(context): def to_1808(context): api.portal.get_tool("portal_workflow").updateRoleMappings() - for brain in api.portal.get_tool("portal_catalog")(portal_type="Prenotazione"): + for brain in api.content.find(portal_type="Prenotazione"): brain.getObject().reindexObjectSecurity() logger.info("Upgraded <{UID}> security settings".format(UID=brain.UID))