Audit when user permissions are changed

I've used the term "admin_roles" in the event data to try and show
that these are not the permissions we store in the DB. This is the
name we use for the abstracted form of permissions in the Admin app.
While we could store the DB permissions, that would be a bit more
effort and arguably it's clearer to keep the event data consistent
with the options the user actually saw / chose.
This commit is contained in:
Ben Thorner
2021-07-15 11:57:33 +01:00
parent 2241b119b0
commit 171f911237
5 changed files with 54 additions and 3 deletions

View File

@@ -141,6 +141,7 @@ def edit_user_permissions(service_id, user_id):
service_id,
permissions=form.permissions,
folder_permissions=form.folder_permissions.data,
set_by_id=current_user.id,
)
# Only change the auth type if this is supported for a service. If a user logs in with a
# security key, we generally don't want them to be able to use something less secure.