~linaro-infrastructure/linaro-license-protection/master

« back to all changes in this revision

Viewing changes to license_protected_downloads/group_auth_ldap.py

  • Committer: Kelley Spoon
  • Date: 2023-06-30 22:28:03 UTC
  • Revision ID: git-v1:5db3e3974cdf4ce174624b1daa2fae2cb22e8ce4
group_auth_ldap.py: change default linaro group

In ldap, the 'linaro' group was deprecated and
replaced by the 'everybody-flat' group.

Since it was hardcoded here, we need to update
the group name in order to allow linaro
employees access to protected urls.

Change-Id: I6b340728ff26faa64a29fd2384d9ebe321dcff36
Signed-off-by: Kelley Spoon <kelley.spoon@linaro.org>
Reviewed-on: https://review.linaro.org/c/infrastructure/linaro-license-protection/+/44724

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    ldap_groups = linaro_ldap.get_groups_and_users()
23
23
 
24
24
    for group in required_groups:
 
25
        if group == 'linaro':
 
26
          group = 'everyone-flat'
25
27
        # skip non-existent groups
26
28
        if group not in ldap_groups:
27
29
            log.warn("Requested membership in non-existent group: %s" % group)