From 1b543d9c6e083b8b85d2c5fb6e65be757fd3c2da Mon Sep 17 00:00:00 2001 From: Ryan Belgrave Date: Thu, 26 Oct 2017 20:08:42 -0500 Subject: [PATCH] Fix admin_or_self --- ingredients_db/alembic/versions/dadf4ada480a_create_authz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingredients_db/alembic/versions/dadf4ada480a_create_authz.py b/ingredients_db/alembic/versions/dadf4ada480a_create_authz.py index 9d54ccc..25a40f8 100644 --- a/ingredients_db/alembic/versions/dadf4ada480a_create_authz.py +++ b/ingredients_db/alembic/versions/dadf4ada480a_create_authz.py @@ -78,7 +78,7 @@ def upgrade(): {"name": "is_admin", "rule": "role:admin", "description": "Is the user in the admin role"}, {"name": "admin_or_member", "rule": "rule:is_admin or project_id:%(project_id)s", "description": "Is the user in the admin role or a member of the project of the requested object"}, - {"name": "admin_or_self", "rule": "rule:is_admin or user_id:%(user_id)", + {"name": "admin_or_self", "rule": "rule:is_admin or user_id:%(user_id)s", "description": "Is the user in the admin role or the requested object matches the user id"}, # Policies