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:
Roberto Rosario
2015-06-28 00:19:49 -04:00
parent 956ca08cbd
commit d26402974a
82 changed files with 898 additions and 895 deletions

View File

@@ -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'))