Skip to content

Commit

Permalink
finalisation de la structure des tests pour group_invitation et group…
Browse files Browse the repository at this point in the history
…_member, ajout de certains cas non traités auparavant dans les models/views
  • Loading branch information
alexmatton committed Dec 4, 2016
1 parent 47fdf0b commit b212ce4
Show file tree
Hide file tree
Showing 7 changed files with 327 additions and 304 deletions.
2 changes: 1 addition & 1 deletion sigma_core/models/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Group(models.Model):
name = models.CharField(max_length=254)
description = models.TextField(blank=True)
is_protected = models.BooleanField(default=False) # if True, the Group cannot be deleted
can_anyone_ask = models.BooleanField(default=False) #if True, people don't need invitation to ask to join
can_anyone_ask = models.BooleanField(default=True) #if True, people don't need invitation to ask to join
need_validation_to_join = models.BooleanField(default=False) #if True, people from the group who can invite need to accept the asker

""" Set the confidentiality of the group's members
Expand Down
4 changes: 2 additions & 2 deletions sigma_core/models/group_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ def has_object_update_permission(self, request):
return False

if (serializer.is_administrator != self.is_administrator or \
serializer.is_super_administrator != self.is_super_administrator) and not mb.is_super_administrator:
serializer.is_super_administrator != self.is_super_administrator) and \
(not mb.is_super_administrator or (mb_is_super_administrator and self==mb)):
return False

return True

except GroupMember.DoesNotExist:
Expand Down
144 changes: 0 additions & 144 deletions sigma_core/tests/test_cluster.py

This file was deleted.

Loading

0 comments on commit b212ce4

Please sign in to comment.