コード例 #1
0
 def get_permissions(self):
     permissions = super().get_permissions()
     user = self.request.user
     permissions['list_collection_users'] = user_permissions.list(
         user, collection=self.object)
     permissions['list_collection_licences'] = licence_permissions.list(
         user, collection=self.object)
     return permissions
コード例 #2
0
 def has_view_permission(self):
     user = self.request.user
     return licence_permissions.list(user, collection=self.object)