'Grants or denies permissions to this moderator.
Does nothing if the given user is not a moderator. Args are named
parameters with bool or None values (use None to all back to the default
for a permission).'

def update_moderator_permissions(self, user, **kwargs):

    rel = self.get_moderator(user)
    if rel:
        rel.update_permissions(**kwargs)
        rel._commit()
