The Security System uses Security Adapters to process and cache security permission requests. Each Security Adapter has the corresponding Security Adapter Provider used internally to register the Adapter. The following assemblies contain platform-dependent Adapters and their Providers.
These assemblies provides you with the RegisterXPOAdapterProviders and RegisterEFAdapterProviders methods that extend the SecurityStrategy class. Use these methods to enable/disable Security Adapters instead of accessing them directly.
This topic describes how to determine a way an application with SecurityStrategyComplex caches permissions.
Enable the Security Adapter
The Solution Wizard adds the following platform-dependent code to enable the Security Adapter in new XAF projects.
You can specify how Security Adapters reload security permissions. To do this, set the SecurityStrategyComplex's PermissionsReloadMode property to the PermissionsReloadMode enumeration value. The default mode is NoCache. In this mode, the cache is created for each Session (in XPO) and DBContext (in EF). Switch to the CacheOnFirstAccess mode to load and cache permissions when secured data is accessed for the first time and use these permissions until a user is logged off. This mode allows you to reduce the number of database requests when working with secured data.
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.