From 243442694cdd6e12d4ade80d6a77cf4b2d8405ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 25 Oct 2017 14:59:17 +0200 Subject: [PATCH] Log warning when someone is denied a project sharing action This indicates that the web frontend showed something that wasn't allowed. --- pillar/api/projects/routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pillar/api/projects/routes.py b/pillar/api/projects/routes.py index 432f1c72..321d6e80 100644 --- a/pillar/api/projects/routes.py +++ b/pillar/api/projects/routes.py @@ -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)