--- a/src/pyams_content/__init__.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/__init__.py Tue Jun 26 14:57:43 2018 +0200
@@ -27,7 +27,7 @@
CREATE_CONTENT_PERMISSION, MANAGE_CONTENT_PERMISSION, COMMENT_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION
from pyams_content.interfaces import WEBMASTER_ROLE, PILOT_ROLE, MANAGER_ROLE, OWNER_ROLE, CONTRIBUTOR_ROLE, \
READER_ROLE, OPERATOR_ROLE, GUEST_ROLE
- from pyams_security.interfaces import ADMIN_USER_ID
+ from pyams_security.interfaces import ADMIN_USER_ID, SYSTEM_ADMIN_ROLE
from pyams_thesaurus.interfaces import CREATE_THESAURUS_PERMISSION, ADMIN_THESAURUS_PERMISSION
from pyams_utils.interfaces import PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION, \
VIEW_SYSTEM_PERMISSION, MANAGE_ROLES_PERMISSION, MANAGE_SKIN_PERMISSION
@@ -57,7 +57,9 @@
MANAGE_SITE_ROOT_PERMISSION, MANAGE_SITE_PERMISSION, MANAGE_TOOL_PERMISSION,
CREATE_CONTENT_PERMISSION, MANAGE_CONTENT_PERMISSION, MANAGE_SKIN_PERMISSION,
COMMENT_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION},
- 'managers': {ADMIN_USER_ID, 'role:system.Manager', 'role:pyams.Webmaster'}})
+ 'managers': {ADMIN_USER_ID,
+ 'role:{0}'.format(SYSTEM_ADMIN_ROLE),
+ 'role:{0}'.format(WEBMASTER_ROLE)}})
config.register_role({'id': PILOT_ROLE,
'title': _("Pilot (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
@@ -65,13 +67,17 @@
MANAGE_SITE_PERMISSION, MANAGE_TOOL_PERMISSION,
MANAGE_CONTENT_PERMISSION, COMMENT_CONTENT_PERMISSION,
PUBLISH_CONTENT_PERMISSION},
- 'managers': {ADMIN_USER_ID, 'role:system.Manager', 'role:pyams.Webmaster'}})
+ 'managers': {ADMIN_USER_ID,
+ 'role:{0}'.format(SYSTEM_ADMIN_ROLE),
+ 'role:{0}'.format(WEBMASTER_ROLE)}})
config.register_role({'id': MANAGER_ROLE,
'title': _("Manager (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
VIEW_SYSTEM_PERMISSION, MANAGE_CONTENT_PERMISSION,
COMMENT_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION},
- 'managers': {ADMIN_USER_ID, 'role:system.Manager', 'role:pyams.Webmaster',
+ 'managers': {ADMIN_USER_ID,
+ 'role:{0}'.format(SYSTEM_ADMIN_ROLE),
+ 'role:{0}'.format(WEBMASTER_ROLE),
'role:pyams.Pilot'}})
config.register_role({'id': OWNER_ROLE,
'title': _("Owner (role)"),
@@ -84,20 +90,32 @@
VIEW_SYSTEM_PERMISSION,
CREATE_CONTENT_PERMISSION, MANAGE_CONTENT_PERMISSION,
COMMENT_CONTENT_PERMISSION},
- 'managers': {ADMIN_USER_ID, 'role:system.Manager', 'role:pyams.Webmaster',
- 'role:pyams.Pilot', 'role:pyams.Owner'}})
+ 'managers': {ADMIN_USER_ID,
+ 'role:{0}'.format(SYSTEM_ADMIN_ROLE),
+ 'role:{0}'.format(WEBMASTER_ROLE),
+ 'role:pyams.Pilot',
+ 'role:pyams.Owner'}})
config.register_role({'id': READER_ROLE,
'title': _("Reader (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, MANAGE_PERMISSION,
VIEW_SYSTEM_PERMISSION, COMMENT_CONTENT_PERMISSION},
- 'managers': {ADMIN_USER_ID, 'role:system.Manager', 'role:pyams.Webmaster',
- 'role:pyams.Pilot', 'role:pyams.Manager', 'role:pyams.Contributor'}})
+ 'managers': {ADMIN_USER_ID,
+ 'role:{0}'.format(SYSTEM_ADMIN_ROLE),
+ 'role:{0}'.format(WEBMASTER_ROLE),
+ 'role:pyams.Pilot',
+ 'role:pyams.Manager',
+ 'role:pyams.Contributor'}})
config.register_role({'id': OPERATOR_ROLE,
'title': _("Operator (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION, VIEW_SYSTEM_PERMISSION},
- 'managers': {ADMIN_USER_ID, 'role:system.Manager'}})
+ 'managers': {ADMIN_USER_ID,
+ 'role:{0}'.format(SYSTEM_ADMIN_ROLE)}})
config.register_role({'id': GUEST_ROLE,
'title': _("Guest user (role)"),
'permissions': {PUBLIC_PERMISSION, VIEW_PERMISSION},
- 'managers': {ADMIN_USER_ID, 'role:system.Manager', 'role:pyams.Webmaster',
- 'role:pyams.Pilot', 'role:pyams.Manager', 'role:pyams.Contributor'}})
+ 'managers': {ADMIN_USER_ID,
+ 'role:{0}'.format(SYSTEM_ADMIN_ROLE),
+ 'role:{0}'.format(WEBMASTER_ROLE),
+ 'role:pyams.Pilot',
+ 'role:pyams.Manager',
+ 'role:pyams.Contributor'}})
--- a/src/pyams_content/generations/__init__.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/generations/__init__.py Tue Jun 26 14:57:43 2018 +0200
@@ -20,7 +20,8 @@
# import interfaces
from pyams_catalog.interfaces import MINUTE_RESOLUTION, DATE_RESOLUTION
from pyams_content.component.theme import IThemesInfo
-from pyams_content.interfaces import IBaseContent
+from pyams_content.interfaces import IBaseContent, WEBMASTER_ROLE, OWNER_ROLE, PILOT_ROLE, MANAGER_ROLE, \
+ CONTRIBUTOR_ROLE
from pyams_content.root.interfaces import ISiteRootToolsConfiguration
from pyams_content.shared.common.interfaces import IWfSharedContent
from pyams_content.shared.form.interfaces import IFormsManagerFactory
@@ -95,11 +96,11 @@
REQUIRED_INDEXES = [
('content_type', FieldIndexWithInterface, {'interface': IBaseContent,
'discriminator': 'content_type'}),
- ('role:owner', PrincipalsRoleIndex, {'role_id': 'pyams.Owner'}),
- ('role:pilot', PrincipalsRoleIndex, {'role_id': 'pyams.Pilot'}),
- ('role:manager', PrincipalsRoleIndex, {'role_id': 'pyams.Manager'}),
- ('role:contributor', PrincipalsRoleIndex, {'role_id': 'pyams.Contributor'}),
- ('role:webmaster', PrincipalsRoleIndex, {'role_id': 'pyams.Webmaster'}),
+ ('role:owner', PrincipalsRoleIndex, {'role_id': OWNER_ROLE}),
+ ('role:pilot', PrincipalsRoleIndex, {'role_id': PILOT_ROLE}),
+ ('role:manager', PrincipalsRoleIndex, {'role_id': MANAGER_ROLE}),
+ ('role:contributor', PrincipalsRoleIndex, {'role_id': CONTRIBUTOR_ROLE}),
+ ('role:webmaster', PrincipalsRoleIndex, {'role_id': WEBMASTER_ROLE}),
('parents', KeywordIndexWithInterface, {'interface': IPathElements,
'discriminator': 'parents'}),
('workflow_state', FieldIndexWithInterface, {'interface': IWorkflowState,
Binary file src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.mo has changed
--- a/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/locales/fr/LC_MESSAGES/pyams_content.po Tue Jun 26 14:57:43 2018 +0200
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-06-25 17:44+0200\n"
+"POT-Creation-Date: 2018-06-26 14:52+0200\n"
"PO-Revision-Date: 2015-09-10 10:42+0200\n"
"Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
"Language-Team: French\n"
@@ -48,31 +48,31 @@
msgid "Webmaster (role)"
msgstr "Webmestre (rôle)"
-#: src/pyams_content/__init__.py:62
+#: src/pyams_content/__init__.py:64
msgid "Pilot (role)"
msgstr "Pilote (rôle)"
-#: src/pyams_content/__init__.py:70
+#: src/pyams_content/__init__.py:74
msgid "Manager (role)"
msgstr "Responsable (rôle)"
-#: src/pyams_content/__init__.py:77
+#: src/pyams_content/__init__.py:83
msgid "Owner (role)"
msgstr "Propriétaire (rôle)"
-#: src/pyams_content/__init__.py:82
+#: src/pyams_content/__init__.py:88
msgid "Contributor (role)"
msgstr "Contributeur (rôle)"
-#: src/pyams_content/__init__.py:90
+#: src/pyams_content/__init__.py:99
msgid "Reader (role)"
msgstr "Relecteur (rôle)"
-#: src/pyams_content/__init__.py:96
+#: src/pyams_content/__init__.py:109
msgid "Operator (role)"
msgstr "Opérateur (rôle)"
-#: src/pyams_content/__init__.py:100
+#: src/pyams_content/__init__.py:114
msgid "Guest user (role)"
msgstr "Invité (rôle)"
@@ -221,7 +221,7 @@
#: src/pyams_content/component/paragraph/interfaces/audio.py:44
#: src/pyams_content/component/links/interfaces/__init__.py:39
#: src/pyams_content/component/video/interfaces/__init__.py:48
-#: src/pyams_content/shared/common/interfaces/__init__.py:149
+#: src/pyams_content/shared/common/interfaces/__init__.py:154
#: src/pyams_content/shared/form/interfaces/__init__.py:66
msgid "Description"
msgstr "Description"
@@ -476,7 +476,7 @@
msgstr ""
"Cliquez sur le bouton 'Parcourir...' pour sélectionner un nouveau contenu"
-#: src/pyams_content/component/keynumber/__init__.py:180
+#: src/pyams_content/component/keynumber/__init__.py:189
#: src/pyams_content/component/keynumber/zmi/__init__.py:198
#: src/pyams_content/component/keynumber/portlet/zmi/__init__.py:79
#: src/pyams_content/component/paragraph/interfaces/keynumber.py:29
@@ -511,15 +511,15 @@
msgid "Add keynumber"
msgstr "Ajouter un chiffre-clé"
-#: src/pyams_content/component/keynumber/zmi/__init__.py:230
+#: src/pyams_content/component/keynumber/zmi/__init__.py:229
msgid "Add new keynumber"
msgstr "Ajout d'un chiffre-clé"
-#: src/pyams_content/component/keynumber/zmi/__init__.py:259
+#: src/pyams_content/component/keynumber/zmi/__init__.py:258
msgid "Edit keynumber properties"
msgstr "Propriétés du chiffre-clé"
-#: src/pyams_content/component/keynumber/zmi/__init__.py:245
+#: src/pyams_content/component/keynumber/zmi/__init__.py:244
msgid "Key number was correctly added"
msgstr "Le chiffre-clé a été ajouté."
@@ -1772,19 +1772,19 @@
msgid "Name of external platform providing selected video"
msgstr "Nom de la plate-forme externe fournissant la vidéo à afficher"
-#: src/pyams_content/shared/common/__init__.py:237
+#: src/pyams_content/shared/common/__init__.py:240
#: src/pyams_content/shared/common/zmi/properties.py:70
#: src/pyams_content/shared/common/zmi/manager.py:96
msgid "Properties"
msgstr "Propriétés"
-#: src/pyams_content/shared/common/__init__.py:147
-#: src/pyams_content/shared/common/__init__.py:155
+#: src/pyams_content/shared/common/__init__.py:150
+#: src/pyams_content/shared/common/__init__.py:158
#, python-format
msgid "{date} by {principal}"
msgstr "{date} par {principal}"
-#: src/pyams_content/shared/common/__init__.py:260
+#: src/pyams_content/shared/common/__init__.py:263
#, python-format
msgid "title length should be between 40 and 66 characters ({length} actually)"
msgstr ""
@@ -2525,10 +2525,8 @@
#: src/pyams_content/shared/common/zmi/security.py:118
#: src/pyams_content/shared/common/zmi/security.py:270
-#: src/pyams_content/shared/common/interfaces/__init__.py:260
-#: src/pyams_content/shared/common/interfaces/__init__.py:285
-msgid "Publication checks"
-msgstr "Activer le tunnel de publication"
+msgid "Activated publication checks?"
+msgstr "Tunnel de publication actif ?"
#: src/pyams_content/shared/common/zmi/security.py:218
msgid "Managers restrictions"
@@ -2968,7 +2966,7 @@
msgstr "Liste des champs de saisie associés à ce type"
#: src/pyams_content/shared/common/interfaces/__init__.py:46
-#: src/pyams_content/root/interfaces/__init__.py:40
+#: src/pyams_content/root/interfaces/__init__.py:43
msgid "Webmasters"
msgstr "Webmestres"
@@ -2992,12 +2990,12 @@
"responsables à certains contenus"
#: src/pyams_content/shared/common/interfaces/__init__.py:57
-#: src/pyams_content/shared/common/interfaces/__init__.py:182
+#: src/pyams_content/shared/common/interfaces/__init__.py:187
msgid "Managers"
msgstr "Responsables"
#: src/pyams_content/shared/common/interfaces/__init__.py:58
-#: src/pyams_content/shared/common/interfaces/__init__.py:183
+#: src/pyams_content/shared/common/interfaces/__init__.py:188
msgid ""
"Managers can handle main operations in tool's workflow, like publish or "
"retire contents"
@@ -3007,7 +3005,7 @@
"restrictions qui leur sont imposées"
#: src/pyams_content/shared/common/interfaces/__init__.py:63
-#: src/pyams_content/shared/common/interfaces/__init__.py:188
+#: src/pyams_content/shared/common/interfaces/__init__.py:193
msgid "Contributors"
msgstr "Contributeurs"
@@ -3015,19 +3013,29 @@
msgid "Contributors are users which are allowed to create new contents"
msgstr "Les contributeurs sont autorisés à créer de nouveaux contenus"
-#: src/pyams_content/shared/common/interfaces/__init__.py:90
+#: src/pyams_content/shared/common/interfaces/__init__.py:68
+#: src/pyams_content/shared/common/interfaces/__init__.py:199
+msgid "Designers"
+msgstr "Designers"
+
+#: src/pyams_content/shared/common/interfaces/__init__.py:69
+#: src/pyams_content/shared/common/interfaces/__init__.py:200
+msgid "Designers are users which are allowed to manage presentation templates"
+msgstr "Les designers sont autorisés à configurer les modèles de présentation"
+
+#: src/pyams_content/shared/common/interfaces/__init__.py:95
msgid "Workflow name"
msgstr "Nom du workflow"
-#: src/pyams_content/shared/common/interfaces/__init__.py:91
+#: src/pyams_content/shared/common/interfaces/__init__.py:96
msgid "Name of workflow utility used to manage tool contents"
msgstr "Nom du workflow qui gère le cycle de vie des contenus de cet outil"
-#: src/pyams_content/shared/common/interfaces/__init__.py:119
+#: src/pyams_content/shared/common/interfaces/__init__.py:124
msgid "Content URL"
msgstr "URL du contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:120
+#: src/pyams_content/shared/common/interfaces/__init__.py:125
msgid ""
"URL used to access this content; this is important for SEO and should "
"include most important words describing content; spaces and underscores will "
@@ -3041,11 +3049,11 @@
"d'union, les lettres accentuées par leur équivalent sans accent, et les mots "
"de moins de trois lettres sont supprimés."
-#: src/pyams_content/shared/common/interfaces/__init__.py:125
+#: src/pyams_content/shared/common/interfaces/__init__.py:130
msgid "Version creator"
msgstr "À l'origine de cette version"
-#: src/pyams_content/shared/common/interfaces/__init__.py:126
+#: src/pyams_content/shared/common/interfaces/__init__.py:131
msgid ""
"Name of content's version creator. The creator of the first version is also "
"it's owner."
@@ -3053,39 +3061,39 @@
"Nom du créateur de cette version. Le créateur de la première version d'un "
"contenu est aussi son propriétaire."
-#: src/pyams_content/shared/common/interfaces/__init__.py:130
+#: src/pyams_content/shared/common/interfaces/__init__.py:135
msgid "First owner"
msgstr "Premier propriétaire"
-#: src/pyams_content/shared/common/interfaces/__init__.py:131
+#: src/pyams_content/shared/common/interfaces/__init__.py:136
msgid "Name of content's first version owner"
msgstr "Nom de l'utilisateur ayant créé la première version"
-#: src/pyams_content/shared/common/interfaces/__init__.py:135
+#: src/pyams_content/shared/common/interfaces/__init__.py:140
msgid "Version creation"
msgstr "Date de création"
-#: src/pyams_content/shared/common/interfaces/__init__.py:138
+#: src/pyams_content/shared/common/interfaces/__init__.py:143
msgid "Version modifiers"
msgstr "Intervenants"
-#: src/pyams_content/shared/common/interfaces/__init__.py:139
+#: src/pyams_content/shared/common/interfaces/__init__.py:144
msgid "List of principals who modified this content"
msgstr "Liste des utilisateurs qui sont intervenus sur cette version"
-#: src/pyams_content/shared/common/interfaces/__init__.py:142
+#: src/pyams_content/shared/common/interfaces/__init__.py:147
msgid "Last modifier"
msgstr "Dernier intervenant"
-#: src/pyams_content/shared/common/interfaces/__init__.py:143
+#: src/pyams_content/shared/common/interfaces/__init__.py:148
msgid "Last principal who modified this content"
msgstr "Dernier utilisateur étant intervenu sur ce contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:146
+#: src/pyams_content/shared/common/interfaces/__init__.py:151
msgid "Last update"
msgstr "Dernière modification"
-#: src/pyams_content/shared/common/interfaces/__init__.py:150
+#: src/pyams_content/shared/common/interfaces/__init__.py:155
msgid ""
"The content's description is 'hidden' into HTML's page headers; but it can "
"be seen, for example, in some search engines results as content's description"
@@ -3094,21 +3102,21 @@
"mais on peut la retrouver, par exemple, dans les listes de résultats des "
"moteurs de recherche"
-#: src/pyams_content/shared/common/interfaces/__init__.py:155
+#: src/pyams_content/shared/common/interfaces/__init__.py:160
msgid "Keywords"
msgstr "Mots-clés"
-#: src/pyams_content/shared/common/interfaces/__init__.py:156
+#: src/pyams_content/shared/common/interfaces/__init__.py:161
msgid "They will be included into HTML pages metadata"
msgstr "Ces mots-clés seront intégrés dans les métadonnées des pages HTML"
-#: src/pyams_content/shared/common/interfaces/__init__.py:159
+#: src/pyams_content/shared/common/interfaces/__init__.py:164
#: src/pyams_content/shared/site/zmi/folder.py:78
#: src/pyams_content/shared/site/interfaces/__init__.py:66
msgid "Notepad"
msgstr "Bloc-notes"
-#: src/pyams_content/shared/common/interfaces/__init__.py:160
+#: src/pyams_content/shared/common/interfaces/__init__.py:165
#: src/pyams_content/shared/site/zmi/folder.py:79
#: src/pyams_content/shared/site/interfaces/__init__.py:67
msgid "Internal information to be known about this content"
@@ -3116,11 +3124,11 @@
"Pour prendre note d'informations internes utiles ou importantes à propos de "
"ce contenu ; ces notes ne seront pas publiées sur internet."
-#: src/pyams_content/shared/common/interfaces/__init__.py:175
+#: src/pyams_content/shared/common/interfaces/__init__.py:180
msgid "Content owner"
msgstr "Propriétaire"
-#: src/pyams_content/shared/common/interfaces/__init__.py:176
+#: src/pyams_content/shared/common/interfaces/__init__.py:181
msgid ""
"The owner is the creator of content's first version, except if it was "
"transferred afterwards to another owner"
@@ -3129,7 +3137,7 @@
"lorsque cette propriété a été transférée à un autre utilisateur après coup. "
"Les contenus archivés ne sont plus transférables."
-#: src/pyams_content/shared/common/interfaces/__init__.py:189
+#: src/pyams_content/shared/common/interfaces/__init__.py:194
msgid ""
"Contributors are users which are allowed to update this content in addition "
"to it's owner"
@@ -3137,11 +3145,11 @@
"Les contributeurs sont autorisés, en plus du propriétaire, à modifier ce "
"contenu"
-#: src/pyams_content/shared/common/interfaces/__init__.py:194
+#: src/pyams_content/shared/common/interfaces/__init__.py:204
msgid "Readers"
msgstr "Relecteurs"
-#: src/pyams_content/shared/common/interfaces/__init__.py:195
+#: src/pyams_content/shared/common/interfaces/__init__.py:205
msgid ""
"Readers are users which are asked to verify and comment contents before they "
"are published"
@@ -3149,22 +3157,27 @@
"Les relecteurs sont des utilisateurs qui sont sollicités pour vérifier et "
"commenter un contenu avant sa publication"
-#: src/pyams_content/shared/common/interfaces/__init__.py:200
+#: src/pyams_content/shared/common/interfaces/__init__.py:210
msgid "Guests"
msgstr "Invités"
-#: src/pyams_content/shared/common/interfaces/__init__.py:201
+#: src/pyams_content/shared/common/interfaces/__init__.py:211
msgid ""
"Guests are users which are allowed to view contents with restricted access"
msgstr ""
"Les invités sont autorisés à consulter des contenus dont l'accès a été "
"restreint"
-#: src/pyams_content/shared/common/interfaces/__init__.py:221
+#: src/pyams_content/shared/common/interfaces/__init__.py:231
msgid "Principal ID"
msgstr "ID utilisateur"
-#: src/pyams_content/shared/common/interfaces/__init__.py:261
+#: src/pyams_content/shared/common/interfaces/__init__.py:270
+#: src/pyams_content/shared/common/interfaces/__init__.py:295
+msgid "Publication checks"
+msgstr "Activer le tunnel de publication"
+
+#: src/pyams_content/shared/common/interfaces/__init__.py:271
msgid ""
"If 'yes', this contributor will have to confirm that contents have been "
"previewed and checked before asking for publication"
@@ -3172,7 +3185,7 @@
"Si 'oui', ce contributeur devra confirmer qu'il a bien prévisualisé et "
"audité chaque contenu avant de pouvoir effectuer une demande de publication"
-#: src/pyams_content/shared/common/interfaces/__init__.py:286
+#: src/pyams_content/shared/common/interfaces/__init__.py:296
msgid ""
"If 'yes', this manager will have to confirm that contents have been "
"previewed and checked before publishing a content"
@@ -3180,11 +3193,11 @@
"Si 'oui', ce responsable devra confirmer qu'il a bien prévisualisé et audité "
"chaque contenu avant de pouvoir effectuer une publication"
-#: src/pyams_content/shared/common/interfaces/__init__.py:291
+#: src/pyams_content/shared/common/interfaces/__init__.py:301
msgid "Restricted contents"
msgstr "Accès restreints"
-#: src/pyams_content/shared/common/interfaces/__init__.py:292
+#: src/pyams_content/shared/common/interfaces/__init__.py:302
msgid ""
"If 'yes', this manager will get restricted access to manage contents based "
"on selected settings"
@@ -3192,11 +3205,11 @@
"Si 'oui', ce responsable n'aura qu'un accès restreint à certains contenus en "
"fonction de paramètres spécifiques"
-#: src/pyams_content/shared/common/interfaces/__init__.py:297
+#: src/pyams_content/shared/common/interfaces/__init__.py:307
msgid "Selected owners"
msgstr "Propriétaires"
-#: src/pyams_content/shared/common/interfaces/__init__.py:298
+#: src/pyams_content/shared/common/interfaces/__init__.py:308
msgid "Manager will have access to contents owned by these principals"
msgstr ""
"Le responsable n'aura accès qu'aux contenus dont ces utilisateurs sont "
@@ -4125,19 +4138,19 @@
msgid "SEARCH - Between all contents"
msgstr "RECHERCHE - Tous contenus confondus"
-#: src/pyams_content/root/interfaces/__init__.py:36
+#: src/pyams_content/root/interfaces/__init__.py:39
msgid "Site managers"
msgstr "Administrateurs"
-#: src/pyams_content/root/interfaces/__init__.py:44
+#: src/pyams_content/root/interfaces/__init__.py:47
msgid "Templates managers"
msgstr "Designers"
-#: src/pyams_content/root/interfaces/__init__.py:48
+#: src/pyams_content/root/interfaces/__init__.py:51
msgid "Operators group"
msgstr "Groupe des opérateurs"
-#: src/pyams_content/root/interfaces/__init__.py:49
+#: src/pyams_content/root/interfaces/__init__.py:52
msgid "Name of group containing all roles owners"
msgstr ""
"Tous les utilisateurs auxquels sera attribué un rôle seront placés dans ce "
@@ -4500,9 +4513,9 @@
"WARNING: this key can't be modified after creation!!! Spaces, uppercase "
"letters ou accentuated characters will be replaced automatically."
msgstr ""
-"ATTENTION : cette clé ne pourra plus être modifiée après sa création. Les espaces, "
-"les majuscules, les lettres accentuées et les caractères spéciaux seront remplacées "
-"automatiquement."
+"ATTENTION : cette clé ne pourra plus être modifiée après sa création. Les "
+"espaces, les majuscules, les lettres accentuées et les caractères spéciaux "
+"seront remplacées automatiquement."
#: src/pyams_content/interfaces/__init__.py:105
msgid "Short name"
--- a/src/pyams_content/locales/pyams_content.pot Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/locales/pyams_content.pot Tue Jun 26 14:57:43 2018 +0200
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
-"POT-Creation-Date: 2018-06-25 17:44+0200\n"
+"POT-Creation-Date: 2018-06-26 14:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -49,31 +49,31 @@
msgid "Webmaster (role)"
msgstr ""
-#: ./src/pyams_content/__init__.py:62
+#: ./src/pyams_content/__init__.py:64
msgid "Pilot (role)"
msgstr ""
-#: ./src/pyams_content/__init__.py:70
+#: ./src/pyams_content/__init__.py:74
msgid "Manager (role)"
msgstr ""
-#: ./src/pyams_content/__init__.py:77
+#: ./src/pyams_content/__init__.py:83
msgid "Owner (role)"
msgstr ""
-#: ./src/pyams_content/__init__.py:82
+#: ./src/pyams_content/__init__.py:88
msgid "Contributor (role)"
msgstr ""
-#: ./src/pyams_content/__init__.py:90
+#: ./src/pyams_content/__init__.py:99
msgid "Reader (role)"
msgstr ""
-#: ./src/pyams_content/__init__.py:96
+#: ./src/pyams_content/__init__.py:109
msgid "Operator (role)"
msgstr ""
-#: ./src/pyams_content/__init__.py:100
+#: ./src/pyams_content/__init__.py:114
msgid "Guest user (role)"
msgstr ""
@@ -213,7 +213,7 @@
#: ./src/pyams_content/component/paragraph/interfaces/audio.py:44
#: ./src/pyams_content/component/links/interfaces/__init__.py:39
#: ./src/pyams_content/component/video/interfaces/__init__.py:48
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:149
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:154
#: ./src/pyams_content/shared/form/interfaces/__init__.py:66
msgid "Description"
msgstr ""
@@ -456,7 +456,7 @@
msgid "Audio file content"
msgstr ""
-#: ./src/pyams_content/component/keynumber/__init__.py:180
+#: ./src/pyams_content/component/keynumber/__init__.py:189
#: ./src/pyams_content/component/keynumber/zmi/__init__.py:198
#: ./src/pyams_content/component/keynumber/portlet/zmi/__init__.py:79
#: ./src/pyams_content/component/paragraph/interfaces/keynumber.py:29
@@ -491,15 +491,15 @@
msgid "Add keynumber"
msgstr ""
-#: ./src/pyams_content/component/keynumber/zmi/__init__.py:230
+#: ./src/pyams_content/component/keynumber/zmi/__init__.py:229
msgid "Add new keynumber"
msgstr ""
-#: ./src/pyams_content/component/keynumber/zmi/__init__.py:259
+#: ./src/pyams_content/component/keynumber/zmi/__init__.py:258
msgid "Edit keynumber properties"
msgstr ""
-#: ./src/pyams_content/component/keynumber/zmi/__init__.py:245
+#: ./src/pyams_content/component/keynumber/zmi/__init__.py:244
msgid "Key number was correctly added"
msgstr ""
@@ -1691,19 +1691,19 @@
msgid "Name of external platform providing selected video"
msgstr ""
-#: ./src/pyams_content/shared/common/__init__.py:237
+#: ./src/pyams_content/shared/common/__init__.py:240
#: ./src/pyams_content/shared/common/zmi/properties.py:70
#: ./src/pyams_content/shared/common/zmi/manager.py:96
msgid "Properties"
msgstr ""
-#: ./src/pyams_content/shared/common/__init__.py:147
-#: ./src/pyams_content/shared/common/__init__.py:155
+#: ./src/pyams_content/shared/common/__init__.py:150
+#: ./src/pyams_content/shared/common/__init__.py:158
#, python-format
msgid "{date} by {principal}"
msgstr ""
-#: ./src/pyams_content/shared/common/__init__.py:260
+#: ./src/pyams_content/shared/common/__init__.py:263
#, python-format
msgid "title length should be between 40 and 66 characters ({length} actually)"
msgstr ""
@@ -2414,9 +2414,7 @@
#: ./src/pyams_content/shared/common/zmi/security.py:118
#: ./src/pyams_content/shared/common/zmi/security.py:270
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:260
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:285
-msgid "Publication checks"
+msgid "Activated publication checks?"
msgstr ""
#: ./src/pyams_content/shared/common/zmi/security.py:218
@@ -2806,7 +2804,7 @@
msgstr ""
#: ./src/pyams_content/shared/common/interfaces/__init__.py:46
-#: ./src/pyams_content/root/interfaces/__init__.py:40
+#: ./src/pyams_content/root/interfaces/__init__.py:43
msgid "Webmasters"
msgstr ""
@@ -2825,19 +2823,19 @@
msgstr ""
#: ./src/pyams_content/shared/common/interfaces/__init__.py:57
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:182
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:187
msgid "Managers"
msgstr ""
#: ./src/pyams_content/shared/common/interfaces/__init__.py:58
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:183
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:188
msgid ""
"Managers can handle main operations in tool's workflow, like publish or "
"retire contents"
msgstr ""
#: ./src/pyams_content/shared/common/interfaces/__init__.py:63
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:188
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:193
msgid "Contributors"
msgstr ""
@@ -2845,159 +2843,174 @@
msgid "Contributors are users which are allowed to create new contents"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:90
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:68
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:199
+msgid "Designers"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:69
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:200
+msgid "Designers are users which are allowed to manage presentation templates"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:95
msgid "Workflow name"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:91
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:96
msgid "Name of workflow utility used to manage tool contents"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:119
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:124
msgid "Content URL"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:120
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:125
msgid ""
"URL used to access this content; this is important for SEO and should include"
" most important words describing content; spaces and underscores will be "
"automatically replaced by hyphens"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:125
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:130
msgid "Version creator"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:126
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:131
msgid ""
"Name of content's version creator. The creator of the first version is also "
"it's owner."
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:130
-msgid "First owner"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:131
-msgid "Name of content's first version owner"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:135
+msgid "First owner"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:136
+msgid "Name of content's first version owner"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:140
msgid "Version creation"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:138
-msgid "Version modifiers"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:139
-msgid "List of principals who modified this content"
-msgstr ""
-
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:142
-msgid "Last modifier"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:143
+msgid "Version modifiers"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:144
+msgid "List of principals who modified this content"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:147
+msgid "Last modifier"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:148
msgid "Last principal who modified this content"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:146
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:151
msgid "Last update"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:150
-msgid ""
-"The content's description is 'hidden' into HTML's page headers; but it can be"
-" seen, for example, in some search engines results as content's description"
-msgstr ""
-
#: ./src/pyams_content/shared/common/interfaces/__init__.py:155
+msgid ""
+"The content's description is 'hidden' into HTML's page headers; but it can be"
+" seen, for example, in some search engines results as content's description"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:160
msgid "Keywords"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:156
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:161
msgid "They will be included into HTML pages metadata"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:159
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:164
#: ./src/pyams_content/shared/site/zmi/folder.py:78
#: ./src/pyams_content/shared/site/interfaces/__init__.py:66
msgid "Notepad"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:160
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:165
#: ./src/pyams_content/shared/site/zmi/folder.py:79
#: ./src/pyams_content/shared/site/interfaces/__init__.py:67
msgid "Internal information to be known about this content"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:175
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:180
msgid "Content owner"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:176
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:181
msgid ""
"The owner is the creator of content's first version, except if it was "
"transferred afterwards to another owner"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:189
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:194
msgid ""
"Contributors are users which are allowed to update this content in addition "
"to it's owner"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:194
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:204
msgid "Readers"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:195
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:205
msgid ""
"Readers are users which are asked to verify and comment contents before they "
"are published"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:200
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:210
msgid "Guests"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:201
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:211
msgid ""
"Guests are users which are allowed to view contents with restricted access"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:221
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:231
msgid "Principal ID"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:261
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:270
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:295
+msgid "Publication checks"
+msgstr ""
+
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:271
msgid ""
"If 'yes', this contributor will have to confirm that contents have been "
"previewed and checked before asking for publication"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:286
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:296
msgid ""
"If 'yes', this manager will have to confirm that contents have been previewed"
" and checked before publishing a content"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:291
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:301
msgid "Restricted contents"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:292
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:302
msgid ""
"If 'yes', this manager will get restricted access to manage contents based on"
" selected settings"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:297
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:307
msgid "Selected owners"
msgstr ""
-#: ./src/pyams_content/shared/common/interfaces/__init__.py:298
+#: ./src/pyams_content/shared/common/interfaces/__init__.py:308
msgid "Manager will have access to contents owned by these principals"
msgstr ""
@@ -3890,19 +3903,19 @@
msgid "SEARCH - Between all contents"
msgstr ""
-#: ./src/pyams_content/root/interfaces/__init__.py:36
+#: ./src/pyams_content/root/interfaces/__init__.py:39
msgid "Site managers"
msgstr ""
-#: ./src/pyams_content/root/interfaces/__init__.py:44
+#: ./src/pyams_content/root/interfaces/__init__.py:47
msgid "Templates managers"
msgstr ""
-#: ./src/pyams_content/root/interfaces/__init__.py:48
+#: ./src/pyams_content/root/interfaces/__init__.py:51
msgid "Operators group"
msgstr ""
-#: ./src/pyams_content/root/interfaces/__init__.py:49
+#: ./src/pyams_content/root/interfaces/__init__.py:52
msgid "Name of group containing all roles owners"
msgstr ""
--- a/src/pyams_content/root/__init__.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/root/__init__.py Tue Jun 26 14:57:43 2018 +0200
@@ -27,8 +27,8 @@
from pyams_content.root.interfaces import ISiteRootRoles, ISiteRootConfiguration, ISiteRoot, \
ISiteRootToolsConfiguration, ISiteRootBackOfficeConfiguration
from pyams_form.interfaces.form import IFormContextPermissionChecker
-from pyams_portal.interfaces import IPortalContext
-from pyams_security.interfaces import IDefaultProtectionPolicy, IGrantedRoleEvent, ISecurityManager
+from pyams_portal.interfaces import IPortalContext, DESIGNER_ROLE
+from pyams_security.interfaces import IDefaultProtectionPolicy, IGrantedRoleEvent, ISecurityManager, SYSTEM_ADMIN_ROLE
from pyams_skin.interfaces.configuration import IConfiguration, IBackOfficeConfiguration
from pyams_utils.interfaces import MANAGE_SYSTEM_PERMISSION
from pyams_utils.interfaces.site import ISiteRootFactory
@@ -55,14 +55,14 @@
class SiteRoot(ProtectedObject, BaseSiteRoot, UserSkinnableContent):
"""Main site root"""
- __roles__ = ('system.Manager', WEBMASTER_ROLE, OPERATOR_ROLE, 'pyams.TemplatesManager')
+ __roles__ = (SYSTEM_ADMIN_ROLE, WEBMASTER_ROLE, OPERATOR_ROLE, DESIGNER_ROLE)
roles_interface = ISiteRootRoles
managers = RolePrincipalsFieldProperty(ISiteRootRoles['managers'])
webmasters = RolePrincipalsFieldProperty(ISiteRootRoles['webmasters'])
operators = RolePrincipalsFieldProperty(ISiteRootRoles['operators'])
- templates_managers = RolePrincipalsFieldProperty(ISiteRootRoles['templates_managers'])
+ designers = RolePrincipalsFieldProperty(ISiteRootRoles['designers'])
content_name = _("Site root")
@@ -91,7 +91,7 @@
def handle_granted_role(event):
"""Add principals to operators group when a role is granted"""
role_id = event.role_id
- if (role_id == 'pyams.Operator') or (not role_id.startswith('pyams.')):
+ if (role_id == OPERATOR_ROLE) or (not role_id.startswith('pyams.')):
return
root = get_parent(event.object, ISiteRoot)
if not root.operators:
--- a/src/pyams_content/root/interfaces/__init__.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/root/interfaces/__init__.py Tue Jun 26 14:57:43 2018 +0200
@@ -16,6 +16,9 @@
# import standard library
# import interfaces
+from pyams_content.interfaces import WEBMASTER_ROLE, OPERATOR_ROLE
+from pyams_portal.interfaces import DESIGNER_ROLE
+from pyams_security.interfaces import SYSTEM_ADMIN_ROLE
from pyams_skin.interfaces.configuration import IConfiguration, IBackOfficeConfiguration
from pyams_utils.interfaces.site import ISiteRoot as ISiteRootBase
@@ -34,20 +37,20 @@
"""Main site roles"""
managers = PrincipalsSet(title=_("Site managers"),
- role_id='system.Manager',
+ role_id=SYSTEM_ADMIN_ROLE,
required=False)
webmasters = PrincipalsSet(title=_("Webmasters"),
- role_id='pyams.Webmaster',
+ role_id=WEBMASTER_ROLE,
required=False)
- templates_managers = PrincipalsSet(title=_("Templates managers"),
- role_id='pyams.TemplatesManager',
- required=False)
+ designers = PrincipalsSet(title=_("Templates managers"),
+ role_id=DESIGNER_ROLE,
+ required=False)
operators = Principal(title=_("Operators group"),
description=_("Name of group containing all roles owners"),
- role_id='pyams.Operator',
+ role_id=OPERATOR_ROLE,
required=False)
--- a/src/pyams_content/shared/common/__init__.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/shared/common/__init__.py Tue Jun 26 14:57:43 2018 +0200
@@ -17,12 +17,14 @@
# import interfaces
from hypatia.interfaces import ICatalog
-from pyams_content.interfaces import IBaseContentInfo
+from pyams_content.interfaces import IBaseContentInfo, OWNER_ROLE, MANAGER_ROLE, CONTRIBUTOR_ROLE, READER_ROLE, \
+ GUEST_ROLE
from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE, ERROR_VALUE
from pyams_content.features.review.interfaces import IReviewComments
from pyams_content.shared.common.interfaces import IWfSharedContent, IWfSharedContentRoles, ISharedContent, \
IBaseSharedTool, ISharedSite, IWfSharedContentFactory
from pyams_i18n.interfaces import II18nManager, II18n
+from pyams_portal.interfaces import DESIGNER_ROLE
from pyams_security.interfaces import IDefaultProtectionPolicy
from pyams_sequence.interfaces import ISequentialIdTarget, ISequentialIdInfo
from pyams_utils.interfaces import VIEW_PERMISSION
@@ -113,12 +115,13 @@
class WfSharedContent(ProtectedObject, Persistent, Contained, I18nManagerMixin):
"""Shared data content class"""
- __roles__ = ('pyams.Owner', 'pyams.Manager', 'pyams.Contributors', 'pyams.Reader', 'pyams.Guest')
+ __roles__ = (OWNER_ROLE, MANAGER_ROLE, CONTRIBUTOR_ROLE, DESIGNER_ROLE, READER_ROLE, GUEST_ROLE)
roles_interface = IWfSharedContentRoles
owner = RolePrincipalsFieldProperty(IWfSharedContentRoles['owner'])
managers = RolePrincipalsFieldProperty(IWfSharedContentRoles['managers'])
contributors = RolePrincipalsFieldProperty(IWfSharedContentRoles['contributors'])
+ designers = RolePrincipalsFieldProperty(IWfSharedContentRoles['designers'])
readers = RolePrincipalsFieldProperty(IWfSharedContentRoles['readers'])
guests = RolePrincipalsFieldProperty(IWfSharedContentRoles['guests'])
--- a/src/pyams_content/shared/common/interfaces/__init__.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/shared/common/interfaces/__init__.py Tue Jun 26 14:57:43 2018 +0200
@@ -18,7 +18,7 @@
# import interfaces
from pyams_content.interfaces import IBaseContent, MANAGE_CONTENT_PERMISSION, OWNER_ROLE, MANAGER_ROLE, \
READER_ROLE, GUEST_ROLE, WEBMASTER_ROLE, PILOT_ROLE, CONTRIBUTOR_ROLE
-from pyams_portal.interfaces import IPortalContext
+from pyams_portal.interfaces import IPortalContext, DESIGNER_ROLE
from pyams_workflow.interfaces import IWorkflowManagedContent
from zope.container.interfaces import IContainer
@@ -65,6 +65,11 @@
role_id=CONTRIBUTOR_ROLE,
required=False)
+ designers = PrincipalsSet(title=_("Designers"),
+ description=_("Designers are users which are allowed to manage presentation templates"),
+ role_id=DESIGNER_ROLE,
+ required=False)
+
class ISharedSite(IBaseContent, IDeletableElement):
"""Shared site interface"""
@@ -188,9 +193,14 @@
contributors = PrincipalsSet(title=_("Contributors"),
description=_("Contributors are users which are allowed to update this content in "
"addition to it's owner"),
- role_id='pyams.Contributor',
+ role_id=CONTRIBUTOR_ROLE,
required=False)
+ designers = PrincipalsSet(title=_("Designers"),
+ description=_("Designers are users which are allowed to manage presentation templates"),
+ role_id=DESIGNER_ROLE,
+ required=False)
+
readers = PrincipalsSet(title=_("Readers"),
description=_("Readers are users which are asked to verify and comment contents before "
"they are published"),
--- a/src/pyams_content/shared/common/manager.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/shared/common/manager.py Tue Jun 26 14:57:43 2018 +0200
@@ -19,6 +19,7 @@
from pyams_content.interfaces import WEBMASTER_ROLE, PILOT_ROLE, MANAGER_ROLE, CONTRIBUTOR_ROLE
from pyams_content.shared.common.interfaces import ISharedToolContainer, IBaseSharedTool, ISharedTool, ISharedToolRoles, \
ISharedContentFactory
+from pyams_portal.interfaces import DESIGNER_ROLE
from pyams_security.interfaces import IDefaultProtectionPolicy
from pyams_workflow.interfaces import IWorkflow
from zope.annotation.interfaces import IAttributeAnnotatable
@@ -46,7 +47,7 @@
class BaseSharedTool(ProtectedObject, I18nManagerMixin):
"""Base shared tool class"""
- __roles__ = (WEBMASTER_ROLE, PILOT_ROLE, MANAGER_ROLE, CONTRIBUTOR_ROLE)
+ __roles__ = (WEBMASTER_ROLE, PILOT_ROLE, MANAGER_ROLE, DESIGNER_ROLE, CONTRIBUTOR_ROLE)
roles_interface = ISharedToolRoles
@@ -54,6 +55,7 @@
pilots = RolePrincipalsFieldProperty(ISharedToolRoles['pilots'])
managers = RolePrincipalsFieldProperty(ISharedToolRoles['managers'])
contributors = RolePrincipalsFieldProperty(ISharedToolRoles['contributors'])
+ designers = RolePrincipalsFieldProperty(ISharedToolRoles['designers'])
title = FieldProperty(IBaseSharedTool['title'])
short_name = FieldProperty(IBaseSharedTool['short_name'])
--- a/src/pyams_content/shared/common/zmi/portal.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/portal.py Tue Jun 26 14:57:43 2018 +0200
@@ -20,6 +20,7 @@
from pyams_content.shared.common.interfaces import IWfSharedContentPortalContext, ISharedToolPortalContext, ISharedTool
from pyams_content.shared.common.interfaces.types import ITypedSharedToolPortalContext
from pyams_form.interfaces.form import IFormHelp
+from pyams_portal.interfaces import MANAGE_TEMPLATE_PERMISSION
from pyams_skin.layer import IPyAMSLayer
from pyams_zmi.layer import IAdminLayer
@@ -27,7 +28,6 @@
from pyams_form.form import ajax_config
from pyams_form.help import FormHelp
from pyams_pagelet.pagelet import pagelet_config
-from pyams_portal import MANAGE_TEMPLATE_PERMISSION
from pyams_portal.zmi.page import PortalContextTemplatePropertiesEditForm
from pyams_utils.adapter import adapter_config
--- a/src/pyams_content/shared/common/zmi/security.py Tue Jun 26 14:00:17 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/security.py Tue Jun 26 14:57:43 2018 +0200
@@ -115,7 +115,7 @@
class SharedToolContributorsRestrictionsChecksColumn(I18nColumn, GetAttrColumn):
"""Shared tool contributor enabled publication checks column"""
- _header = _("Publication checks")
+ _header = _("Activated publication checks?")
weight = 20
cssClasses = {'td': 'center'}
@@ -267,7 +267,7 @@
class SharedToolManagerRestrictionsChecksColumn(I18nColumn, GetAttrColumn):
"""Shared tool manager enabled publication checks column"""
- _header = _("Publication checks")
+ _header = _("Activated publication checks?")
weight = 40
cssClasses = {'td': 'center'}