Added state list, create, edit, delete views

This commit is contained in:
Roberto Rosario
2012-03-16 01:55:21 -04:00
parent ffb5fc8286
commit 89aeb8ad7c
6 changed files with 153 additions and 13 deletions

View File

@@ -4,9 +4,15 @@ from django.utils.translation import ugettext_lazy as _
from permissions.models import PermissionNamespace, Permission
user_management_namespace = PermissionNamespace('workflows', _(u'Workflows'))
namespace = PermissionNamespace('workflows', _(u'Workflows'))
PERMISSION_WORKFLOW_SETUP_VIEW = Permission.objects.register(namespace, 'workflow_setup_view', _(u'View existing workflow templates'))
PERMISSION_WORKFLOW_SETUP_CREATE = Permission.objects.register(namespace, 'workflow_setup_create', _(u'Create new workflow templates'))
PERMISSION_WORKFLOW_SETUP_EDIT = Permission.objects.register(namespace, 'workflow_setup_edit', _(u'Edit existing workflow templates'))
PERMISSION_WORKFLOW_SETUP_DELETE = Permission.objects.register(namespace, 'workflow_setup_delete', _(u'Delete existing workflow templates'))
PERMISSION_STATE_SETUP_VIEW = Permission.objects.register(namespace, 'state_setup_view', _(u'View existing states'))
PERMISSION_STATE_SETUP_CREATE = Permission.objects.register(namespace, 'state_setup_create', _(u'Create new state templates'))
PERMISSION_STATE_SETUP_EDIT = Permission.objects.register(namespace, 'state_setup_edit', _(u'Edit existing state templates'))
PERMISSION_STATE_SETUP_DELETE = Permission.objects.register(namespace, 'state_setup_delete', _(u'Delete existing state templates'))
PERMISSION_WORKFLOW_SETUP_VIEW = Permission.objects.register(user_management_namespace, 'workflow_setup_view', _(u'View existing workflow templates'))
PERMISSION_WORKFLOW_SETUP_CREATE = Permission.objects.register(user_management_namespace, 'workflow_setup_create', _(u'Create new workflow templates'))
PERMISSION_WORKFLOW_SETUP_EDIT = Permission.objects.register(user_management_namespace, 'workflow_setup_edit', _(u'Edit existing workflow templates'))
PERMISSION_WORKFLOW_SETUP_DELETE = Permission.objects.register(user_management_namespace, 'workflow_setup_delete', _(u'Delete existing workflow templates'))