Log warning when someone is denied a project sharing action

This indicates that the web frontend showed something that wasn't allowed.
This commit is contained in:
Sybren A. Stüvel 2017-10-25 14:59:17 +02:00
parent a4addbfd22
commit 243442694c

View File

@ -72,6 +72,8 @@ def project_manage_users():
if not authorization.user_has_role('admin'):
remove_self = target_user_id == current_user_id and action == 'remove'
if project['user'] != current_user_id and not remove_self:
log.warning('User %s tries to %s %s to/from project %s, but is not allowed',
current_user_id, action, target_user_id, project_id)
utils.abort_with_error(403)
admin_group = utils.get_admin_group(project)