哪种方法可以测试基于对象的权限?
样品:
from rest_framework import permissions
class IsOfficeAdmin(permissions.BasePermission):
def has_object_permission(self, request, view, obj):
office = obj
return office.admin == request.user
答案 0 :(得分:1)
问题: