mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
Allow custom auth file to define valid roles
This commit is contained in:
parent
ad25c31d3f
commit
987587aaf8
@ -125,6 +125,9 @@ def add_roles(_allowed,_denied):
|
||||
loaded_file = yaml.safe_load(stream)
|
||||
try:
|
||||
allowed_loaded = loaded_file["allowedbyrole"]
|
||||
for role in allowed_loaded:
|
||||
if role not in configmanager._validroles:
|
||||
configmanager._validroles.append(role)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
|
@ -127,7 +127,7 @@ _attraliases = {
|
||||
'bmcpass': 'secret.hardwaremanagementpassword',
|
||||
'switchpass': 'secret.hardwaremanagementpassword',
|
||||
}
|
||||
_validroles = ('Administrator', 'Operator', 'Monitor', 'Stub')
|
||||
_validroles = ['Administrator', 'Operator', 'Monitor', 'Stub']
|
||||
|
||||
membership_callback = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user