def permission_manager_list_lib(self): ''' 返回给权限管理页面 ''' roles = Role.all() permissions = Permission.all() menus = Menu.all() handlers = Handler.all() users = User.all() return roles, permissions, menus, handlers, users
def permission_manager_list_lib(self): # 获取所有的角色/权限/菜单/处理器/用户 roles = Role.all() permissions = Permission.all() menus = Menu.all() handlers = Handler.all() users = User.all() return roles, permissions, menus, handlers, users
def permission_manager_list_lib(self): """01权限管理页面函数""" roles = Role.all() permissions = Permission.all() menus = Menu.all() handlers = Handler.all() users = User.all() #研发员工 dev_role = Role.by_name('研发员工') dev_users = dev_role.users if dev_role else [] return roles, permissions, menus, handlers, users, dev_users, dev_role.id
def permission_manage_list_lib(self): """01权限管理页面函数""" roles = Role.all() permissions = Permission.all() menus = Menu.all() handlers = Handler.all() users = User.all() # 研发员工 dev_role = Role.by_name('研发部门') dev_users = dev_role.users if dev_role else [] # print("*****") # print(type(dev_role)) # print(dev_role) if dev_role is None: return roles, permissions, menus, handlers, users, dev_users, None return roles, permissions, menus, handlers, users, dev_users, dev_role.id