From af09d7ca4be1e2dda65fb8aea7ee2ea19135214b Mon Sep 17 00:00:00 2001 From: armando-migliaccio Date: Tue, 16 Dec 2014 13:43:26 -0800 Subject: [PATCH] Extend ACL checks to OpenStack namespace. Change-Id: I0ac6ee99391f218fa467b58bf39934c6c68d1808 --- tools/check_valid_gerrit_config.sh | 2 +- tools/normalize_acl.py | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/check_valid_gerrit_config.sh b/tools/check_valid_gerrit_config.sh index 1c4ea9b189..605d9b8fd1 100755 --- a/tools/check_valid_gerrit_config.sh +++ b/tools/check_valid_gerrit_config.sh @@ -25,7 +25,7 @@ function check_team_acl { } # Add more namespaces here, if necessary -for namespace in stackforge openstack-dev; do +for namespace in stackforge openstack openstack-dev; do check_team_acl "${CONFIGS_LIST_BASE}${namespace}" done diff --git a/tools/normalize_acl.py b/tools/normalize_acl.py index 1687040bab..dbe1ea5dd2 100755 --- a/tools/normalize_acl.py +++ b/tools/normalize_acl.py @@ -111,14 +111,26 @@ if '6' in transformations: acl[section] = newsection if '7' in transformations: - special_teams = ("core", "milestone", "Users", "admins") + special_projects = ( + 'ossa', + ) + special_teams = ( + 'admins', + 'committee', + 'core', + 'maint', + 'Managers', + 'milestone', + 'Users', + ) for section in acl.keys(): newsection = [] for option in acl[section]: - if ("refs/heads" in section and "group" in option - and "-2..+2" in option - and not any(x in option for x in special_teams)): - option = "%s%s" % (option, "-core") + if ('refs/heads' in section and 'group' in option + and '-2..+2' in option + and not any(x in option for x in special_teams) + and not any(x in aclfile for x in special_projects)): + option = '%s%s' % (option, '-core') newsection.append(option) acl[section] = newsection