aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--license_protected_downloads/group_auth_ldap.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/license_protected_downloads/group_auth_ldap.py b/license_protected_downloads/group_auth_ldap.py
index 3896beb..ad485b8 100644
--- a/license_protected_downloads/group_auth_ldap.py
+++ b/license_protected_downloads/group_auth_ldap.py
@@ -22,6 +22,10 @@ def process_group_auth(request, required_groups):
ldap_groups = linaro_ldap.get_groups_and_users()
for group in required_groups:
+ # skip non-existent groups
+ if group not in ldap_groups:
+ log.warn("Requested membership in non-existent group: %s" % group)
+ continue
if user in ldap_groups[group]:
return True
return False