From ac65b403e3af01f7a91f9a5c1779b34e5c38ed56 Mon Sep 17 00:00:00 2001 From: Elio Schmutz Date: Fri, 28 Feb 2020 16:48:47 +0100 Subject: [PATCH] Extend the opengever deployment directive with workspace roles. --- docs/HISTORY.txt | 1 + opengever/setup/deploy.py | 7 +++++++ opengever/setup/meta.py | 15 +++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index 5c5c37e53e5..89ce2dee1d1 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -4,6 +4,7 @@ Changelog 2020.2.0rc1 (unreleased) ------------------------ +- Extend the opengever deployment directive with workspace roles. [elioschmutz] - Set seen_tours for all users in test fixture. [njohner] diff --git a/opengever/setup/deploy.py b/opengever/setup/deploy.py index 8f887c389ea..efffd3ca9a9 100644 --- a/opengever/setup/deploy.py +++ b/opengever/setup/deploy.py @@ -175,6 +175,13 @@ def configure_plone_site(self): 'records_manager_group', 'Records Manager') self.assign_group_to_role(self.site, self.config, 'api_group', 'APIUser') + self.assign_group_to_role(self.site, self.config, + 'workspace_client_user_group', + 'WorkspaceClientUser') + self.assign_group_to_role(self.site, self.config, + 'workspace_user_group', 'WorkspacesUser') + self.assign_group_to_role(self.site, self.config, + 'workspace_creator_group', 'WorkspacesCreator') # REALLY set the language - the plone4 addPloneSite is really # buggy with languages. diff --git a/opengever/setup/meta.py b/opengever/setup/meta.py index 86012c01116..62a3bbd2bce 100644 --- a/opengever/setup/meta.py +++ b/opengever/setup/meta.py @@ -85,6 +85,21 @@ class IDeploymentDirective(Interface): required=False, max_length=GROUP_ID_LENGTH) + workspace_creator_group = TextLine( + title=u'Workspace creator group', + required=False, + max_length=GROUP_ID_LENGTH) + + workspace_user_group = TextLine( + title=u'Workspace user group', + required=False, + max_length=GROUP_ID_LENGTH) + + workspace_client_user_group = TextLine( + title=u'Workspace client group', + required=False, + max_length=GROUP_ID_LENGTH) + def register_ldap(context, **kwargs): title = kwargs.get('title')