!10 后端接口权限验证bug修改

Merge pull request !10 from 火鸡不肥/dvadmin-dev
pull/10/MERGE
火鸡不肥 2021-03-30 00:01:36 +08:00 committed by 李强
parent 99729d866e
commit ab6c4731d4
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ class PermissionModeMiddleware(MiddlewareMixin):
if user.is_superuser or (hasattr(user, 'role') and user.role.filter(status='1', admin=True).count()):
return 20
# (3)user的角色有该接口权限, 是:通过, 否:不通过
if view_path in user.get_user_interface_dict:
if view_path in user.get_user_interface_dict.get(method, []):
return 30
return -10