mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-15 14:58:42 +00:00
fix: 修复获取令牌信息的remote app资产信息 (#8619)
* fix: 修复连接令牌只获取自己的令牌信息;修复连接令牌系统用户角色权限问题(普通用户看不到); * fix: 修复获取令牌信息的remote app资产信息 * fix: 修复获取用户个人信息时使用连接令牌 * fix: 修复获取profile时的连接令牌问题 * fix: 修复连接令牌问题 * fix: 修复连接令牌问题 Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
This commit is contained in:
@@ -60,11 +60,11 @@ class Permission(DjangoPermission):
|
||||
if actions == '*' and resource == '*':
|
||||
pass
|
||||
elif actions == '*' and resource != '*':
|
||||
kwargs['codename__iregex'] = r'[a-z]+_{}'.format(resource)
|
||||
kwargs['codename__iregex'] = r'[a-z]+_{}$'.format(resource)
|
||||
elif actions != '*' and resource == '*':
|
||||
kwargs['codename__iregex'] = r'({})_[a-z]+'.format(actions_regex)
|
||||
else:
|
||||
kwargs['codename__iregex'] = r'({})_{}'.format(actions_regex, resource)
|
||||
kwargs['codename__iregex'] = r'({})_{}$'.format(actions_regex, resource)
|
||||
q |= Q(**kwargs)
|
||||
return q
|
||||
|
||||
|
Reference in New Issue
Block a user