BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374085 )
Change subject: Guard striker.tools.utils.tools_admin for anons ...................................................................... Guard striker.tools.utils.tools_admin for anons The anon user will not have an ldap_dn property, so ensure that we are not talking to an anon before checking for tools.admin membership. Change-Id: If6ecdf18ad5349ec325d04fffea3f0ff54c00186 --- M striker/tools/utils.py 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/striker refs/changes/85/374085/1 diff --git a/striker/tools/utils.py b/striker/tools/utils.py index 8f5ef87..f5ec6e8 100644 --- a/striker/tools/utils.py +++ b/striker/tools/utils.py @@ -111,6 +111,8 @@ def tools_admin(user): """Is the given user an administrator of the tools project?""" + if user.is_anonymous(): + return False return user.ldap_dn in Tool.objects.get(cn='tools.admin').members -- To view, visit https://gerrit.wikimedia.org/r/374085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6ecdf18ad5349ec325d04fffea3f0ff54c00186 Gerrit-PatchSet: 1 Gerrit-Project: labs/striker Gerrit-Branch: master Gerrit-Owner: BryanDavis <bda...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits