Allow registering permission from the permission namespace. Replace all permission variables to be lowercase (style guide reserver uppercase variables for constants and literals).
This commit is contained in:
@@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from permissions.models import PermissionNamespace, Permission
|
||||
from permissions.models import PermissionNamespace
|
||||
|
||||
events_namespace = PermissionNamespace('events', _('Events'))
|
||||
PERMISSION_EVENTS_VIEW = Permission.objects.register(events_namespace, 'events_view', _('Access the events of an object'))
|
||||
namespace = PermissionNamespace('events', _('Events'))
|
||||
permission_events_view = namespace.add_permission(name='events_view', label=_('Access the events of an object'))
|
||||
|
||||
Reference in New Issue
Block a user