Remove unneeded 'create' from all tags sections

Look for all keys that begin with 'refs/tags' rather than just the
string literal 'refs/tags/*' when removing unneeded create permissions
from tag access sections.

Change-Id: I6dc226065166038700ffd324d354e617596888cb
This commit is contained in:
K Jonathan Harker 2015-04-01 10:40:26 -07:00
parent 43c8c5e8b9
commit ca12f2f79d
1 changed files with 5 additions and 6 deletions

View File

@ -70,12 +70,11 @@ for line in aclfd:
aclfd.close()
if '2' in transformations:
try:
acl['access "refs/tags/*"'] = [
x for x in acl['access "refs/tags/*"']
if not x.startswith('create = ')]
except KeyError:
pass
for key in acl:
if key.startswith('access "refs/tags/'):
acl[key] = [
x for x in acl[key]
if not x.startswith('create = ')]
if '3' in transformations:
try: