Example #1
0
    def setUp(self):
        super(LinkClassTestCase, self).setUp()

        self.add_test_view(test_object=self.group)

        self.namespace = PermissionNamespace(TEST_PERMISSION_NAMESPACE_NAME,
                                             TEST_PERMISSION_NAMESPACE_TEXT)

        self.permission = self.namespace.add_permission(
            name=TEST_PERMISSION_NAME, label=TEST_PERMISSION_LABEL)

        self.link = Link(text=TEST_LINK_TEXT, view=TEST_VIEW_NAME)
        Permission.invalidate_cache()
Example #2
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('folders', _('Folders'))

permission_folder_create = namespace.add_permission(name='folder_create',
                                                    label=_('Create folders'))
permission_folder_edit = namespace.add_permission(name='folder_edit',
                                                  label=_('Edit folders'))
permission_folder_delete = namespace.add_permission(name='folder_delete',
                                                    label=_('Delete folders'))
permission_folder_remove_document = namespace.add_permission(
    name='folder_remove_document', label=_('Remove documents from folders'))
permission_folder_view = namespace.add_permission(name='folder_view',
                                                  label=_('View folders'))
# Translators: this refers to the permission that will allow users to add
# documents to folders.
permission_folder_add_document = namespace.add_permission(
    name='folder_add_document', label=_('Add documents to folders'))
Example #3
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('tags', _('Tags'))

permission_tag_create = namespace.add_permission(name='tag_create',
                                                 label=_('Create new tags'))
permission_tag_delete = namespace.add_permission(name='tag_delete',
                                                 label=_('Delete tags'))
permission_tag_view = namespace.add_permission(name='tag_view',
                                               label=_('View tags'))
permission_tag_edit = namespace.add_permission(name='tag_edit',
                                               label=_('Edit tags'))
permission_tag_attach = namespace.add_permission(
    name='tag_attach', label=_('Attach tags to documents'))
permission_tag_remove = namespace.add_permission(
    name='tag_remove', label=_('Remove tags from documents'))
Example #4
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('acls', _('Access control lists'))

permission_acl_edit = namespace.add_permission(name='acl_edit',
                                               label=_('Edit ACLs'))
permission_acl_view = namespace.add_permission(name='acl_view',
                                               label=_('View ACLs'))
Example #5
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('events', _('Events'))
permission_events_view = namespace.add_permission(
    name='events_view', label=_('Access the events of an object'))
Example #6
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('sources_setup', _('Sources setup'))
permission_sources_setup_create = namespace.add_permission(
    name='sources_setup_create', label=_('Create new document sources'))
permission_sources_setup_delete = namespace.add_permission(
    name='sources_setup_delete', label=_('Delete document sources'))
permission_sources_setup_edit = namespace.add_permission(
    name='sources_setup_edit', label=_('Edit document sources'))
permission_sources_setup_view = namespace.add_permission(
    name='sources_setup_view', label=_('View existing document sources'))
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('common', _('Common'))

permission_error_log_view = namespace.add_permission(
    name='error_log_view', label=_('View error log')
)
Example #8
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('task_manager', _('Task manager'))

permission_task_view = namespace.add_permission(name='task_view',
                                                label=_('View tasks'))
Example #9
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('cabinets', _('Cabinets'))

# Translators: this refers to the permission that will allow users to add
# documents to cabinets.
permission_cabinet_add_document = namespace.add_permission(
    name='cabinet_add_document', label=_('Add documents to cabinets'))
permission_cabinet_create = namespace.add_permission(
    name='cabinet_create', label=_('Create cabinets'))
permission_cabinet_delete = namespace.add_permission(
    name='cabinet_delete', label=_('Delete cabinets'))
permission_cabinet_edit = namespace.add_permission(name='cabinet_edit',
                                                   label=_('Edit cabinets'))
permission_cabinet_remove_document = namespace.add_permission(
    name='cabinet_remove_document', label=_('Remove documents from cabinets'))
permission_cabinet_view = namespace.add_permission(name='cabinet_view',
                                                   label=_('View cabinets'))
Example #10
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('linking', _('Smart links'))

permission_smart_link_view = namespace.add_permission(
    name='smart_link_view', label=_('View existing smart links'))
permission_smart_link_create = namespace.add_permission(
    name='smart_link_create', label=_('Create new smart links'))
permission_smart_link_delete = namespace.add_permission(
    name='smart_link_delete', label=_('Delete smart links'))
permission_smart_link_edit = namespace.add_permission(
    name='smart_link_edit', label=_('Edit smart links'))
Example #11
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('registers', _('Registro documenti'))

permission_document_register_in = namespace.add_permission(
    name='register_in_document', label=_('Registra documenti in entrata'))
permission_document_register_in_override = namespace.add_permission(
    name='register_in_document_override',
    label=_('Forza registro documenti in entrata'))
permission_document_register_out = namespace.add_permission(
    name='register_out_document', label=_('Registra documenti in uscita'))
permission_document_register_out_detail_view = namespace.add_permission(
    name='register_out_detail_view', label=_('Check out details view'))
Example #12
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('installation', _('Installation'))
permission_installation_details = namespace.add_permission(
    name='installation_details',
    label=_('View installation environment details'))
Example #13
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('ocr', _('OCR'))

permission_ocr_document = namespace.add_permission(
    name='ocr_document', label=_('Submit documents for OCR'))
permission_ocr_content_view = namespace.add_permission(
    name='ocr_content_view',
    label=_('View the transcribed text from document'))
permission_document_type_ocr_setup = namespace.add_permission(
    name='ocr_document_type_setup',
    label=_('Change document type OCR settings'))
Example #14
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace(
    'document_signatures', _('Document signatures')
)

permission_document_version_sign_detached = namespace.add_permission(
    name='document_version_sign_detached',
    label=_('Sign documents with detached signatures')
)
permission_document_version_sign_embedded = namespace.add_permission(
    name='document_version_sign_embedded',
    label=_('Sign documents with embedded signatures')
)
permission_document_version_signature_delete = namespace.add_permission(
    name='document_version_signature_delete',
    label=_('Delete detached signatures')
)
permission_document_version_signature_download = namespace.add_permission(
    name='document_version_signature_download',
    label=_('Download detached document signatures')
)
permission_document_version_signature_upload = namespace.add_permission(
    name='document_version_signature_upload',
    label=_('Upload detached document signatures')
)
permission_document_version_signature_verify = namespace.add_permission(
Example #15
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('smart_settings', _('Smart settings'))

permission_settings_view = namespace.add_permission(
    name='permission_settings_view', label=_('View settings')
)
Example #16
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('statistics', _('Statistics'))

permission_statistics_view = namespace.add_permission(
    name='statistics_view', label=_('View statistics'))
Example #17
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('document_indexing', _('Indexing'))

permission_document_indexing_create = namespace.add_permission(
    name='document_index_create', label=_('Create new document indexes'))
permission_document_indexing_edit = namespace.add_permission(
    name='document_index_edit', label=_('Edit document indexes'))
permission_document_indexing_delete = namespace.add_permission(
    name='document_index_delete', label=_('Delete document indexes'))
permission_document_indexing_view = namespace.add_permission(
    name='document_index_view', label=_('View document indexes'))
permission_document_indexing_rebuild = namespace.add_permission(
    name='document_rebuild_indexes', label=_('Rebuild document indexes'))
Example #18
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('metadata', _('Metadata'))
permission_metadata_document_edit = namespace.add_permission(
    name='metadata_document_edit', label=_('Edit a document\'s metadata'))
permission_metadata_document_add = namespace.add_permission(
    name='metadata_document_add', label=_('Add metadata to a document'))
permission_metadata_document_remove = namespace.add_permission(
    name='metadata_document_remove',
    label=_('Remove metadata from a document'))
permission_metadata_document_view = namespace.add_permission(
    name='metadata_document_view', label=_('View metadata from a document'))

setup_namespace = PermissionNamespace('metadata_setup', _('Metadata setup'))
permission_metadata_type_edit = setup_namespace.add_permission(
    name='metadata_type_edit', label=_('Edit metadata types'))
permission_metadata_type_create = setup_namespace.add_permission(
    name='metadata_type_create', label=_('Create new metadata types'))
permission_metadata_type_delete = setup_namespace.add_permission(
    name='metadata_type_delete', label=_('Delete metadata types'))
permission_metadata_type_view = setup_namespace.add_permission(
    name='metadata_type_view', label=_('View metadata types'))
Example #19
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('mailing', _('Mailing'))

permission_mailing_link = namespace.add_permission(
    name='mail_link', label=_('Send document link via email'))
permission_mailing_send_document = namespace.add_permission(
    name='mail_document', label=_('Send document via email'))
permission_view_error_log = namespace.add_permission(
    name='view_error_log', label=_('View system mailing error log'))
permission_user_mailer_create = namespace.add_permission(
    name='user_mailer_create', label=_('Create an user mailer'))
permission_user_mailer_delete = namespace.add_permission(
    name='user_mailer_delete', label=_('Delete an user mailer'))
permission_user_mailer_edit = namespace.add_permission(
    name='user_mailer_edit', label=_('Edit an user mailer'))
permission_user_mailer_view = namespace.add_permission(
    name='user_mailer_view', label=_('View an user mailer'))
permission_user_mailer_use = namespace.add_permission(
    name='user_mailer_use', label=_('Use an user mailer'))
Example #20
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('motd', _('Message of the day'))

permission_message_create = namespace.add_permission(
    name='message_create', label=_('Create messages'))
permission_message_delete = namespace.add_permission(
    name='message_delete', label=_('Delete messages'))
permission_message_edit = namespace.add_permission(name='message_edit',
                                                   label=_('Edit messages'))
permission_message_view = namespace.add_permission(name='message_view',
                                                   label=_('View messages'))
Example #21
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('converter', _('Converter'))

permission_transformation_create = namespace.add_permission(
    name='transformation_create', label=_('Create new transformations'))
permission_transformation_delete = namespace.add_permission(
    name='transformation_delete', label=_('Delete transformations'))
permission_transformation_edit = namespace.add_permission(
    name='transformation_edit', label=_('Edit transformations'))
permission_transformation_view = namespace.add_permission(
    name='transformation_view', label=_('View existing transformations'))
Example #22
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('document_parsing', _('Document parsing'))

permission_content_view = namespace.add_permission(
    name='content_view', label=_('View the content of a document')
)

permission_parse_document = namespace.add_permission(
    name='parse_document', label=_('Parse the content of a document')
)
Example #23
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('document_states', _('Document workflows'))

permission_workflow_create = namespace.add_permission(
    name='workflow_create', label=_('Create workflows'))
permission_workflow_delete = namespace.add_permission(
    name='workflow_delte', label=_('Delete workflows'))
permission_workflow_edit = namespace.add_permission(name='workflow_edit',
                                                    label=_('Edit workflows'))
permission_workflow_view = namespace.add_permission(name='workflow_view',
                                                    label=_('View workflows'))
# Translators: This text refers to the permission to grant user the ability to
# 'transition workflows' from one state to another, to move the workflow
# forwards
permission_workflow_transition = namespace.add_permission(
    name='workflow_transition', label=_('Transition workflows'))
permission_workflow_tools = namespace.add_permission(
    name='workflow_tools', label=_('Execute workflow tools'))
Example #24
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('checkouts', _('Document checkout'))

permission_document_checkin = namespace.add_permission(
    name='checkin_document', label=_('Check in documents'))
permission_document_checkin_override = namespace.add_permission(
    name='checkin_document_override', label=_('Forcefully check in documents'))
permission_document_checkout = namespace.add_permission(
    name='checkout_document', label=_('Check out documents'))
permission_document_checkout_detail_view = namespace.add_permission(
    name='checkout_detail_view', label=_('Check out details view'))
Example #25
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('comments', _('Comments'))

permission_comment_create = namespace.add_permission(
    name='comment_create', label=_('Create new comments'))
permission_comment_delete = namespace.add_permission(
    name='comment_delete', label=_('Delete comments'))
permission_comment_view = namespace.add_permission(name='comment_view',
                                                   label=_('View comments'))
Example #26
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('django_gpg', _('Key management'))

permission_key_view = namespace.add_permission(name='key_view',
                                               label=_('View keys'))
permission_key_delete = namespace.add_permission(name='key_delete',
                                                 label=_('Delete keys'))
permission_keyserver_query = namespace.add_permission(
    name='keyserver_query', label=_('Query keyservers'))
permission_key_receive = namespace.add_permission(
    name='key_receive', label=_('Import keys from keyservers'))
Example #27
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('documents', _('Documents'))

permission_document_create = namespace.add_permission(
    name='document_create', label=_('Create documents'))
permission_document_delete = namespace.add_permission(
    name='document_delete', label=_('Delete documents'))
permission_document_trash = namespace.add_permission(
    name='document_trash', label=_('Trash documents'))
permission_document_download = namespace.add_permission(
    name='document_download', label=_('Download documents'))
permission_document_edit = namespace.add_permission(name='document_edit',
                                                    label=_('Edit documents'))
permission_document_new_version = namespace.add_permission(
    name='document_new_version', label=_('Create new document versions'))
permission_document_properties_edit = namespace.add_permission(
    name='document_properties_edit', label=_('Edit document properties'))
permission_document_print = namespace.add_permission(
    name='document_print', label=_('Print documents'))
permission_document_restore = namespace.add_permission(
    name='document_restore', label=_('Restore trashed document'))
permission_document_tools = namespace.add_permission(
    name='document_tools', label=_('Execute document modifying tools'))
permission_document_version_revert = namespace.add_permission(
    name='document_version_revert',
    label=_('Revert documents to a previous version'))
Example #28
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from permissions import PermissionNamespace

namespace = PermissionNamespace('user_management', _('User management'))

permission_group_create = namespace.add_permission(
    name='group_create', label=_('Create new groups'))
permission_group_delete = namespace.add_permission(
    name='group_delete', label=_('Delete existing groups'))
permission_group_edit = namespace.add_permission(
    name='group_edit', label=_('Edit existing groups'))
permission_group_view = namespace.add_permission(
    name='group_view', label=_('View existing groups'))
permission_user_create = namespace.add_permission(name='user_create',
                                                  label=_('Create new users'))
permission_user_delete = namespace.add_permission(
    name='user_delete', label=_('Delete existing users'))
permission_user_edit = namespace.add_permission(name='user_edit',
                                                label=_('Edit existing users'))
permission_user_view = namespace.add_permission(name='user_view',
                                                label=_('View existing users'))