Clear our the groups before re-adding permissions

This commit is contained in:
2010-03-01 11:25:07 +00:00
parent 0f7d9f80de
commit 8463f05425

View File

@@ -34,6 +34,7 @@ class SSOUser(models.Model):
def update_access(self): def update_access(self):
""" Steps through each Eve API registered to the user and updates their group """ Steps through each Eve API registered to the user and updates their group
access accordingly """ access accordingly """
self.user.groups.clear()
for eacc in EVEAccount.objects.filter(user=self.user): for eacc in EVEAccount.objects.filter(user=self.user):
for char in eacc.characters.all(): for char in eacc.characters.all():
if char.corporation.group: if char.corporation.group: