예제 #1
0
 def can_delete(self, request=None, instance=None, child=None, field=None):
     actor = ActorPermission(
         instance=self,
         request=request or get_current_request(),
     )
     actor.can_delete()
     return actor.has_permission()
예제 #2
0
 def can_m2m_remove(self, request=None, instance=None, child=None, field=None):
     actor = ActorPermission(
             instance=instance,
             request=request or get_current_request(),
             child=child,
             field=field,)
     actor.can_m2m_remove()
     return actor.has_permission()
예제 #3
0
 def can_edit(self, request, instance, child=None, field=None):
     actor = ActorPermission(
         instance=instance,
         request=request or get_current_request(),
         child=child,
         field=field,
     )
     actor.can_edit()
     return actor.has_permission()
예제 #4
0
 def can_delete(self, request=None, instance=None, child=None, field=None):
     actor = ActorPermission(
             instance=self,
             request=request or get_current_request(),)
     actor.can_delete()
     return actor.has_permission()