I have a button named "SET" on my view which I want to enable when an authorized person ("Administrator") is signed in on the session.
I have made a sign-in and sign-out button which can be used for authentication or to sign in in to the session, so when Admin is signed in, the SET button should be enabled and when signed out it should be disabled/grayed out.
For this I used 'isAuthorized' for the entire view rather than on the SET button, but for some reason it is not working properly. Could you be able to help me figure out with this....
This is the Configure Event script for the entire view
def runAction(self):
isAuthorized = system.perspective.isAuthorized(False, 'Authenticated/Roles/Administrator')
if (isAuthorized == False):
self.getChild("root").getChild("Button").props.enabled = isAuthorized
Thank you in advance!!