From b4e3d79dfa9ba237bd25b842dead60ef6b78ed6f Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 12 2016 11:09:17 +0000 Subject: Fix checking if the user is a repo admin or not In the previous state we were re-defining the user object in the inner loop when checking if the user is one of the admins of the project. This means that when we reached the last check (is the user in a group having commits) the user we were looking was no longer the one we started with. Thanks @pbrobinson for reporting the bug --- diff --git a/pagure/__init__.py b/pagure/__init__.py index 53662a1..32f4b41 100644 --- a/pagure/__init__.py +++ b/pagure/__init__.py @@ -220,7 +220,7 @@ def is_repo_admin(repo_obj): for usr in grp.users] return user == repo_obj.user.user or ( - user in [user.user for user in repo_obj.users] + user in [usr.user for usr in repo_obj.users] ) or (user in usergrps)