# -*- coding: utf-8 # Copyright 2004 by Vahur Rebas """ This implements and defines some security """ perm_view = 'View' # perm_edit = 'Edit' - not used(?) perm_manage = 'Korpus: Manage Korpus' perm_edit_page = 'Korpus: Edit Page' perm_edit_document = 'Korpus: Edit Document' perm_edit_tree = 'Korpus: Edit Tree' perm_mark_document = 'Korpus: Mark Document' perm_change_informant = 'Korpus: Change Informant' perm_view_document = 'Korpus: View Document' perm_change_status = 'Korpus: Change Document Status' perm_list_documents = 'Korpus: List Documents' perm_del_documents = 'Korpus: Delete Documents' perm_add_documents = 'Korpus: Add Documents' perm_view_wordbank = 'Korpus: View wordbank' # Inserter - can only insert documents # Marker - Inserter + can mark documents # User - User + mark documents. cannot touch global tree # Admin - User + can change global tree korpus_roles = ('Inserter', 'Marker', 'Admin') #from Products.CMFCore.permissions import setDefaultRoles # from AccessControl.Permission import registerPermissions as setDefaultRoles setDefaultRoles(((perm_change_informant, korpus_roles),)) setDefaultRoles(((perm_edit_page, korpus_roles),)) setDefaultRoles(((perm_view_document, korpus_roles),)) setDefaultRoles(((perm_change_status, korpus_roles),)) setDefaultRoles(((perm_view_wordbank, korpus_roles),))