Exemplo n.º 1
0
 def get(self):
     kw = {
         'user_msg': self.get_redis_json_to_dict('user'),
         'role_msg': self.get_redis_json_to_dict('role'),
         'system_msg': self.get_redis_json_to_dict('system'),
         'roles': Role.all(),
     }
     self.render('message/message_send_message.html', **kw)
Exemplo n.º 2
0
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
Exemplo n.º 4
0
 def get(self):
     self.conn.delete('massage:%s' %
                      self.current_user.name)  # 到这个页面删除拥护邮件记录
     kw = {
         'roles': Role.all(),
         'user_msg': self.get_redis_json_to_dict('user'),
         'role_msg': self.get_redis_json_to_dict('role'),
         'system_msg': self.get_redis_json_to_dict('system'),
     }
     self.render('message/message_send_message.html', **kw)
Exemplo n.º 5
0
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
Exemplo n.º 6
0
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