fix get role in register_user_dlt
This commit is contained in:
parent
44b1a245b6
commit
cd440b9931
|
@ -57,7 +57,7 @@ class RegisterUserDlt:
|
||||||
data_eth = json.dumps(ethereum)
|
data_eth = json.dumps(ethereum)
|
||||||
user.api_keys_dlt = encrypt(password, data_eth)
|
user.api_keys_dlt = encrypt(password, data_eth)
|
||||||
|
|
||||||
lroles = []
|
roles = []
|
||||||
try:
|
try:
|
||||||
# TODO Not works
|
# TODO Not works
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
|
@ -66,8 +66,7 @@ class RegisterUserDlt:
|
||||||
attributes = user.get_abac_attributes()
|
attributes = user.get_abac_attributes()
|
||||||
for c in attributes:
|
for c in attributes:
|
||||||
if 'role' in c.get('attributeURI'):
|
if 'role' in c.get('attributeURI'):
|
||||||
lrole.append(c.get('attributeValue'))
|
roles.append(c.get('attributeValue'))
|
||||||
roles = ",".join(lrole)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
roles = ["Operator"]
|
roles = ["Operator"]
|
||||||
|
|
||||||
|
|
Reference in New Issue