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

BLOG by Dennis Garavsky: Storing security settings (users, roles, permissions) and application-specific data in separate databases

$
0
0
I wanted to inform the community of a solution we have just finished testing for the next XAF version in response to the following customer's business scenario:

"We have 2 content databases and we will be running multiple applications on the same databases. Therefore i would like to have a separate database for each application to store the application specific data in...For security reasons we are not allowed to store security data in the same DB as our other data. It not our choice."






As you probably know, XAF supports connecting to several databases and even using both Entity Framework (EF) and eXpress Persistent Objects (XPO) at the same time (examples: onetwothree), although it is not the primary scenario, to be honest. The aforementioned scenario could currently be solved if your application uses DevExpress XPO for data access (by implementing an IDataStore proxy as per this example), but there were no good solutions for EF or EF + XPO cases. In our case, a customer was using EF so the solution would be complicated (see the details).

The good news is that starting with version 14.2.5, we made accomplishing this business scenario easier for both EF and XPO data access options. Now IObjectSpace (an XAF abstraction representing a context to a specific database) from the registered XafApplication.ObjectSpaceProviders collection is passed to the security system and there this information is reused to query permissions from the corresponding database.

I would greatly appreciate it if you let me know in comments if you experienced a similar scenario and how the new solution works for you.

Viewing all articles
Browse latest Browse all 861

Trending Articles