For the session.prop.auth
object:
We have a nested security level such as:
Authenticated
Authenticated/Roles
Authenticated/Roles/Level1
etc...
And it looks like this:
{"children":[
{"children":[
{"children":[],"name":"Level1"},
{"children":[],"name":"Level2"}
],"name":"Roles"}
],"name":"Authenticated"}
I am trying to determine if the user is:
- Authenticated (I think I got this one)
- Or has
Level1
clearance
I have not been successful at getting into the list of roles yet.
I have this so far, but I get lost on looping through and checking values in the list:
for i in dict1.keys():
for x in dict1[i]:
print(x)
This results in printing out the whole list of roles, then the word Authenticated
printed one letter per line afterwards.
Thanks in advance!