36 lines
1002 B
Python
36 lines
1002 B
Python
from __future__ import unicode_literals
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from mayan.apps.common.apps import MayanAppConfig
|
|
from mayan.apps.common.menus import menu_object, menu_secondary
|
|
from mayan.apps.navigation import SourceColumn
|
|
|
|
from .links import link_acl_create, link_acl_delete, link_acl_permissions
|
|
|
|
|
|
class ACLsApp(MayanAppConfig):
|
|
app_namespace = 'acls'
|
|
app_url = 'acls'
|
|
has_rest_api = True
|
|
has_tests = True
|
|
name = 'mayan.apps.acls'
|
|
verbose_name = _('ACLs')
|
|
|
|
def ready(self):
|
|
super(ACLsApp, self).ready()
|
|
|
|
AccessControlList = self.get_model('AccessControlList')
|
|
|
|
SourceColumn(
|
|
attribute='role', is_sortable=True, source=AccessControlList,
|
|
)
|
|
|
|
menu_object.bind_links(
|
|
links=(link_acl_permissions, link_acl_delete),
|
|
sources=(AccessControlList,)
|
|
)
|
|
menu_secondary.bind_links(
|
|
links=(link_acl_create,), sources=('acls:acl_list',)
|
|
)
|