123456789101112131415161718 |
- import View.view_privilege as view_privilege
- from utility.privilege_manager import *
- inventory_read_only_role = Privilege_Role(name="read_only")
- inventory_admin_role = Privilege_Role(name="admin")
- def init():
- inventory_privilege_domain = Privilege_Domain("inventory",description="privilege domain for inventory")
- view_privilege.manager.register_domain(inventory_privilege_domain)
- inventory_privilege_domain.add_role(inventory_read_only_role)
- inventory_privilege_domain.add_role(inventory_admin_role)
- inventory_privilege_domain.include_role(inventory_admin_role,inventory_read_only_role)
|