diff --git a/news/SUP-40874.bugfix b/news/SUP-40874.bugfix
new file mode 100644
index 000000000..4e0c05180
--- /dev/null
+++ b/news/SUP-40874.bugfix
@@ -0,0 +1,2 @@
+Fix frozen_suspension state
+[jchandelle]
\ No newline at end of file
diff --git a/src/Products/urban/migration/update_codt_2024.py b/src/Products/urban/migration/update_codt_2024.py
index 36c96f10e..691579df5 100644
--- a/src/Products/urban/migration/update_codt_2024.py
+++ b/src/Products/urban/migration/update_codt_2024.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+from liege.urban.migration.utils import refresh_workflow_permissions
from Products.urban import URBAN_TYPES
from Products.urban.setuphandlers import createFolderDefaultValues
from datetime import datetime
@@ -313,3 +314,16 @@ def add_new_index_and_new_filter(context):
)
logger.info("upgrade done!")
+
+
+def fix_supended_state_licence(context):
+ logger = logging.getLogger("urban: Fix supended state licence")
+ logger.info("starting upgrade steps")
+ portal = api.portal.get()
+ urban_path = "/".join(portal["urban"].getPhysicalPath())
+ refresh_workflow_permissions(
+ "codt_buildlicence_workflow",
+ folder_path=urban_path,
+ for_states=["suspension", "frozen_suspension"]
+ )
+ logger.info("upgrade done!")
diff --git a/src/Products/urban/migration/upgrades.zcml b/src/Products/urban/migration/upgrades.zcml
index b13876f13..18e2cde54 100644
--- a/src/Products/urban/migration/upgrades.zcml
+++ b/src/Products/urban/migration/upgrades.zcml
@@ -208,4 +208,13 @@
profile="Products.urban:default"
/>
+
+
diff --git a/src/Products/urban/profiles/default/metadata.xml b/src/Products/urban/profiles/default/metadata.xml
index a3526fdf7..c0a22c909 100644
--- a/src/Products/urban/profiles/default/metadata.xml
+++ b/src/Products/urban/profiles/default/metadata.xml
@@ -1,6 +1,6 @@
- 1141
+ 1142
profile-Products.urban:preinstall
diff --git a/src/Products/urban/workflows/codt_licence_workflow.py b/src/Products/urban/workflows/codt_licence_workflow.py
index a1d766a80..841fb5501 100644
--- a/src/Products/urban/workflows/codt_licence_workflow.py
+++ b/src/Products/urban/workflows/codt_licence_workflow.py
@@ -58,4 +58,19 @@ class StateRolesMapping(BaseRoleMapping):
BaseRoleMapping.get_readers: ("Reader",),
BaseRoleMapping.get_editors: ("Reader", "Reviewer"),
},
+ "obsolete": {
+ BaseRoleMapping.get_readers: ("Reader",),
+ BaseRoleMapping.get_editors: ("Reader", "Reviewer"),
+ BaseRoleMapping.get_opinion_editors: ("Reader",),
+ },
+ "suspension": {
+ BaseRoleMapping.get_readers: ("Reader",),
+ BaseRoleMapping.get_editors: ("Reader", "Reviewer"),
+ BaseRoleMapping.get_opinion_editors: ("Reader",),
+ },
+ "frozen_suspension": {
+ BaseRoleMapping.get_readers: ("Reader",),
+ BaseRoleMapping.get_editors: ("Reader", "Reviewer"),
+ BaseRoleMapping.get_opinion_editors: ("Reader",),
+ },
}