mirror of https://github.com/jumpserver/jumpserver
lots
parent
ca271900e6
commit
4d3e7d694b
|
@ -14,7 +14,7 @@
|
|||
name: group_admin
|
||||
password: pbkdf2_sha256$20000$ttObUWd15q10$NJoyZf2OZz9oiw2g4j2TkTh9zGgyVDRFdUkhn8X0nB0=
|
||||
email: group_admin@jumpserver.org
|
||||
role: DA
|
||||
role: GA
|
||||
is_active: 1
|
||||
- model: juser.usergroup
|
||||
pk: 1
|
||||
|
|
|
@ -499,9 +499,8 @@ def is_role_request(request, role='user'):
|
|||
require this request of user is right
|
||||
要求请求角色正确
|
||||
"""
|
||||
role_all = {'user': 0, 'admin': 1, 'super': 2}
|
||||
# TODO: liuzheng's work
|
||||
if request.session.get('role_id') == role_all.get(role, 0):
|
||||
role_all = {'user': 'CU', 'admin': 'GA', 'super': 'SU'}
|
||||
if request.user.role == role_all.get(role, 'CU'):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
|
|
@ -14,7 +14,8 @@ from juser.user_api import *
|
|||
|
||||
|
||||
def chg_role(request):
|
||||
role = {'SU': 2, 'DA': 1, 'CU': 0}
|
||||
# TODO: disable it! by liuzheng
|
||||
role = {'SU': 2, 'GA': 1, 'CU': 0}
|
||||
user, dept = get_session_user_dept(request)
|
||||
# TODO: liuzheng's work
|
||||
if request.session['role_id'] > 0:
|
||||
|
|
Loading…
Reference in New Issue