Update route function to revoke CCPO superuser status
This commit is contained in:
@@ -62,6 +62,6 @@ def confirm_new_user():
|
||||
@user_can(Permissions.DELETE_CCPO_USER, message="remove ccpo user")
|
||||
def remove_access(user_id):
|
||||
user = Users.get(user_id)
|
||||
# update user to remove perms
|
||||
# flash alert to confirm removing ccpo perms
|
||||
Users.revoke_ccpo_perms(user)
|
||||
flash("ccpo_user_removed", user_name=user.full_name)
|
||||
return redirect(url_for("ccpo.users"))
|
||||
|
@@ -40,6 +40,11 @@ MESSAGES = {
|
||||
"message_template": translate("ccpo.form.user_not_found_text"),
|
||||
"category": "info",
|
||||
},
|
||||
"ccpo_user_removed": {
|
||||
"title_template": translate("flash.success"),
|
||||
"message_template": "You have successfully removed {{ user_name }}'s CCPO permissions.",
|
||||
"category": "success",
|
||||
},
|
||||
"environment_added": {
|
||||
"title_template": translate("flash.success"),
|
||||
"message_template": """
|
||||
|
Reference in New Issue
Block a user