dispatch/modules/auth/models.py
def modify_permissions(self, permissions):
        """Modify the user's permissions."""

        group = Group.objects.get(name='Admin')

        if permissions == 'admin':
            self.groups.add(group)
        else:
            self.groups.remove(group)
def modify_permissions(self, permissions):
        """Modify the user's permissions."""

        group = Group.objects.get(name='Admin')

        if permissions == 'admin':
            self.groups.add(group)
        else:
            self.groups.remove(group)
def modify_permissions ( self , permissions ) : group = Group . objects . get ( name = 'Admin' ) if permissions == 'admin' : self . groups . add ( group ) else : self . groups . remove ( group )
Modify the user's permissions.
Modify the user s permissions .