15 |
15 |
16 # import standard library |
16 # import standard library |
17 |
17 |
18 # import interfaces |
18 # import interfaces |
19 from pyams_skin.layer import IPyAMSLayer |
19 from pyams_skin.layer import IPyAMSLayer |
|
20 from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION |
20 from pyams_zmi.layer import IAdminLayer |
21 from pyams_zmi.layer import IAdminLayer |
21 |
22 |
22 # import packages |
23 # import packages |
23 from pyams_pagelet.pagelet import pagelet_config |
24 from pyams_pagelet.pagelet import pagelet_config |
24 from pyams_template.template import template_config |
25 from pyams_template.template import template_config |
25 from pyams_zmi.view import AdminView |
26 from pyams_zmi.view import AdminView |
26 from zope.interface import Interface |
27 from zope.interface import Interface |
27 |
28 |
28 |
29 |
29 @pagelet_config(name='admin.html', layer=IPyAMSLayer, context=Interface, permission='system.view') |
30 @pagelet_config(name='admin.html', layer=IPyAMSLayer, context=Interface, permission=VIEW_SYSTEM_PERMISSION) |
30 @template_config(template='templates/admin.pt', layer=IAdminLayer) |
31 @template_config(template='templates/admin.pt', layer=IAdminLayer) |
31 class MainAdminPage(AdminView): |
32 class MainAdminPage(AdminView): |
32 """Main administration page""" |
33 """Main administration page""" |