mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-21 19:38:07 +00:00
fix: 修复 private storage permission
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from rest_framework import permissions
|
||||
|
||||
|
||||
class IsAssignee(permissions.BasePermission):
|
||||
class IsAssignee(permissions.IsAuthenticated):
|
||||
def has_object_permission(self, request, view, obj):
|
||||
return obj.has_current_assignee(request.user)
|
||||
|
||||
|
||||
class IsApplicant(permissions.BasePermission):
|
||||
class IsApplicant(permissions.IsAuthenticated):
|
||||
|
||||
def has_object_permission(self, request, view, obj):
|
||||
return obj.applicant == request.user
|
||||
|
Reference in New Issue
Block a user