Skip to content

Commit

Permalink
Remove duplicate permission checks
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBirdie authored and TheBirdie committed Jan 31, 2016
1 parent 9658b94 commit c00174b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sigma_core/models/group_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class Meta:

@staticmethod
def has_read_permission(request):
return request.user.is_authenticated()
return True

# Object-level permissions are handled on GroupFieldViewSet
#def has_object_read_permission(self, request):
# return request.user.is_authenticated() and request.user.is_group_member(self.group)
# return request.user.is_group_member(self.group)

@staticmethod
def has_write_permission(request):
return request.user.is_authenticated()
return True

def has_object_write_permission(self, request):
return request.user.is_authenticated() and request.user.has_group_admin_perm(self.group)
return request.user.has_group_admin_perm(self.group)

0 comments on commit c00174b

Please sign in to comment.