Quantcast
Channel: eXpandFramework RSS
Viewing all articles
Browse latest Browse all 861

BLOG by Dennis Garavsky: Refreshing UI according to the security permission changes done through the application or directly in the database

$
0
0
I want to repost my recent answer from this Support Center thread to collect more feedback from users:
To ensure better performance, security permissions are cached on the first request by default, so that subsequent requests for object access rights are taken from the internal cache. We have received several customer requests to modify this behavior so that the most recent permission info was considered without the cache. In those scenarios, permission data was changed externally by an application administrator who wanted it to be applied immediately without forcing the user to restart his or her app.

To enable the new mode, set the static SecuritySystem.CanRefreshPermissions property to True before a user is logged in, e.g. within the static constructor of your platform-agnostic module (YourSolutionName.Module) or within the Main function of the WinForms app or from the Application_Start method of your ASP.NET app respectively:


[C#]

...
namespaceMainDemo.Module{
publicsealedpartialclassMainDemoModule:ModuleBase{
staticMainDemoModule(){
SecuritySystem.CanRefreshPermissions=true;
}
...
}
}
Once you do this, security permission changes will be queried after the built-in Refresh Action is executed or when a new object DetailView is opened. This guarantees that an end-user will see the application screens updated according to the most recent information. Additionally, the object access permissions by criteria will also be correctly re-evaluated according to the latest data changes. Consider the following scenario: there is a TestObject class with the Name and Description properties. Reading the Name property is always available, while the Description can be read only if Name equals "1":

Previously, to be able to see the effect of a permission after changing the Name property, you had to re-logon the current user as per How do I reset the security permissions cache without logging in again after an administrator has changed user rights?
Now, with the SecuritySystem.CanRefreshPermissions option set to True, it is sufficient to press the Refresh button.

We would greatly appreciate you downloading the most recent 15.1.5+ hot-fix build (or wait for the official v15.1.6) and testing this behavior in action with your project to see if it meets your needs.
If this does not fully suit you, please describe the most important use-case scenarios and expected results that you wish to achieve with the security permission checking mechanism.

Viewing all articles
Browse latest Browse all 861

Trending Articles