refactor: streamline auth_resource method for improved readability and maintainability
This commit is contained in:
parent
e7a30903ba
commit
13596ed7e8
@ -104,8 +104,6 @@ class UserResourcePermissionSerializer(serializers.Serializer):
|
|||||||
|
|
||||||
def auth_resource(self, resource_id: str):
|
def auth_resource(self, resource_id: str):
|
||||||
self.is_valid(raise_exception=True)
|
self.is_valid(raise_exception=True)
|
||||||
workspace_manage = is_workspace_manage(self.data.get('user_id'), self.data.get('workspace_id'))
|
|
||||||
if not workspace_manage:
|
|
||||||
auth_target_type = self.data.get('auth_target_type')
|
auth_target_type = self.data.get('auth_target_type')
|
||||||
workspace_id = self.data.get('workspace_id')
|
workspace_id = self.data.get('workspace_id')
|
||||||
user_id = self.data.get('user_id')
|
user_id = self.data.get('user_id')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user