--- a/src/pyams_zmi/skin.py Thu Jul 13 10:39:59 2017 +0200
+++ b/src/pyams_zmi/skin.py Thu Jul 13 10:49:31 2017 +0200
@@ -9,9 +9,6 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
-from pyramid.view import view_config
-
-from pyams_form.form import AJAXEditForm
__docformat__ = 'restructuredtext'
@@ -21,16 +18,18 @@
# import interfaces
from pyams_skin.interfaces import ISkin, IUserSkinnable
from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION, MANAGE_SYSTEM_PERMISSION
+from pyams_utils.interfaces import MANAGE_SKIN_PERMISSION
from pyams_zmi.interfaces.menu import IPropertiesMenu
from pyams_zmi.layer import IAdminLayer
# import packages
+from pyams_form.form import AJAXEditForm
from pyams_pagelet.pagelet import pagelet_config
from pyams_skin.viewlet.menu import MenuItem, MenuDivider
from pyams_utils.registry import utility_config
from pyams_viewlet.viewlet import viewlet_config
from pyams_zmi.form import AdminDialogEditForm
+from pyramid.view import view_config
from z3c.form import field
from pyams_zmi import _
@@ -49,7 +48,7 @@
#
@viewlet_config(name='user-skin-properties.menu', context=IUserSkinnable, layer=IAdminLayer, manager=IPropertiesMenu,
- permission=VIEW_SYSTEM_PERMISSION, weight=5)
+ permission=MANAGE_SKIN_PERMISSION, weight=5)
class UserSkinnablePropertiesMenuItem(MenuItem):
"""User skin properties menu"""
@@ -60,13 +59,13 @@
@viewlet_config(name='user-skin-properties.divider', context=IUserSkinnable, layer=IAdminLayer, manager=IPropertiesMenu,
- permission=VIEW_SYSTEM_PERMISSION, weight=6)
+ permission=MANAGE_SKIN_PERMISSION, weight=6)
class UserSkinnablePropertiesMenuDivider(MenuDivider):
"""User skin properties menu divider"""
@pagelet_config(name='user-skin-properties.html', context=IUserSkinnable, layer=IPyAMSLayer,
- permission=VIEW_SYSTEM_PERMISSION)
+ permission=MANAGE_SKIN_PERMISSION)
class UserSkinnablePropertiesEditForm(AdminDialogEditForm):
"""User skin properties edit form"""
@@ -82,10 +81,10 @@
return fields
ajax_handler = 'user-skin-properties.json'
- edit_permission = MANAGE_SYSTEM_PERMISSION
+ edit_permission = MANAGE_SKIN_PERMISSION
@view_config(name='user-skin-properties.json', context=IUserSkinnable, request_type=IPyAMSLayer,
- permission=MANAGE_SYSTEM_PERMISSION, renderer='json', xhr=True)
+ permission=MANAGE_SKIN_PERMISSION, renderer='json', xhr=True)
class UserSkinnablePropertiesAJAXEditForm(AJAXEditForm, UserSkinnablePropertiesEditForm):
"""User skin properties edit form, JSON renderer"""