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(): view_privilege.manager.create_domain(name="inventory",description="privilege domain for inventory") inventory_privilege_domain = view_privilege.manager.get_domain_by_name("inventory") 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)