fix(perms): 用户授权树bug

This commit is contained in:
xinwen
2020-09-29 17:13:32 +08:00
committed by 老广
parent 3ccf32ed48
commit 3af0e68c84
5 changed files with 49 additions and 26 deletions

View File

@@ -11,8 +11,8 @@ from perms.models import UserGrantedMappingNode
class UserNodeGrantStatusDispatchMixin:
@staticmethod
def get_mapping_node_by_key(key):
return UserGrantedMappingNode.objects.get(key=key)
def get_mapping_node_by_key(key, user):
return UserGrantedMappingNode.objects.get(key=key, user=user)
def dispatch_get_data(self, key, user):
status = UserGrantedMappingNode.get_node_granted_status(key, user)