def has_object_permission(self, request, view, obj): # This means that we allowed this auth backend on this endpoint if self._check_internal_or_ephemeral(request=request): return True return access.has_object_permission(entity=Entities.OWNER, permission=ClusterPermission, request=request, view=view, obj=obj)
def has_object_permission(self, request: HttpRequest, view, obj) -> bool: # This means that we allowed this auth backend on this endpoint if self._check_internal_or_ephemeral(request=request): return True return access.has_object_permission(resource=Resources.NODE, permission=NodePermission, request=request, view=view, obj=obj)
def has_object_permission(self, request, view, obj): # This means that we allowed this auth backend on this endpoint if self._check_internal_or_ephemeral(request=request): return True return access.has_object_permission(resource=Resources.ACTIVITY_LOG, permission=ActivityLogPermission, request=request, view=view, obj=obj)
def has_object_permission(self, request: HttpRequest, view, obj) -> bool: if self._check_internal_or_ephemeral(request=request): return True result = super().has_object_permission(request, view, obj.owner) if not result: return result return access.has_object_permission(resource=Resources.PROJECT, permission=ProjectPermission, request=request, view=view, obj=obj)