Allow case insensitive role matching for cert permissions
This commit is contained in:
parent
075b18e5db
commit
6abf274680
|
@ -29,6 +29,9 @@ class CertificatePermission(Permission):
|
||||||
needs = [RoleNeed('admin'), RoleNeed(owner), RoleNeed('creator')]
|
needs = [RoleNeed('admin'), RoleNeed(owner), RoleNeed('creator')]
|
||||||
for r in roles:
|
for r in roles:
|
||||||
needs.append(CertificateOwnerNeed(str(r)))
|
needs.append(CertificateOwnerNeed(str(r)))
|
||||||
|
# Backwards compatibility with mixed-case role names
|
||||||
|
if str(r) != str(r).lower():
|
||||||
|
needs.append(CertificateOwnerNeed(str(r).lower()))
|
||||||
|
|
||||||
super(CertificatePermission, self).__init__(*needs)
|
super(CertificatePermission, self).__init__(*needs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue