Add ability for super users to rename and delete organizations
This commit is contained in:
parent
27d8ea3d5c
commit
3e1abba284
5 changed files with 230 additions and 1 deletions
|
@ -1118,6 +1118,7 @@ def change_username(user_id, new_username):
|
|||
# Rename the user
|
||||
user.username = new_username
|
||||
user.save()
|
||||
return user
|
||||
|
||||
|
||||
def change_invoice_email(user, invoice_email):
|
||||
|
@ -2623,6 +2624,10 @@ def delete_matching_notifications(target, kind_name, **kwargs):
|
|||
notification.delete_instance()
|
||||
|
||||
|
||||
def get_organizations():
|
||||
return User.select().where(User.organization == True, User.robot == False)
|
||||
|
||||
|
||||
def get_active_users():
|
||||
return User.select().where(User.organization == False, User.robot == False)
|
||||
|
||||
|
|
Reference in a new issue