Dear Support,
I use this code to check if user has a permission or not. In this example, i want to check if user has 'Navigate' permission:
SecuritySystem.IsGranted(New ClientPermissionRequest(objecttype, Nothing, Nothing, SecurityOperations.Navigate))
The code works fine but I see that it looks like this function uses 'cached' permissions to check. For example, presently user has this permission and he has logged into the system. After that, the administrator removes this permission while the user is still logging. In this case I see that permission is still TRUE. But if user logs off then log in again, this function will return FALSE.
So my question is: how to ensure the above function always uses the latest permission ?
Thank you
Hello Gregory,
I apologize for the delayed response. We are working on your issue and will get to you as soon as we can. Please bear with us.
For now, you can try to 'refresh' permissions by re-logging the user programmatically:
object oldLogonObjectSpaceParam = SecuritySystem.Instance.LogonParameters; SecuritySystem.Instance.Logoff(); (SecuritySystem.Instance as SecurityStrategy).Authentication.SetLogonParameters(oldLogonObjectSpaceParam); SecuritySystem.Instance.Logon(Application.CreateObjectSpace());
Thank Dennis,
Sorry I think this code cannot work in my case because we cannot know if we need to logoff or not. You know that administrator and client use different machines.
Waiting for your next response.
Thank you
Thanks for the additional info, Gregory. We will consider it when preparing the final answer.