Shared Authorization Rules Clear the Cache

Shared Authorization Rules Clear the Cache

Old forum URL: forums.lhotka.net/forums/t/1293.aspx


Grant.Argy posted on Wednesday, September 20, 2006

Our application will be servicing companies that may have 1000's of employees and up to 100 different roles plus around a 1000 field authorization rules. This equates to around 100,000 rules to take into account when setting the shared rules.

To improve the performance and take this issue away we have created a generic internal role and a stored proc that returns a joined authorization list based on the user that logs in. The only problem is that when a user logs out and logs in as another we need to clear the shared authorization rules.

We don't want to use instance rules because they will be called on every instance, so we have modified the CSLA to have an accesible method that clears this cache.

I would prefer to not make mods to the framework any other suggestions.

Thanks

DansDreams replied on Thursday, September 21, 2006

I don't understand.  The rules themselves change based on who logs in?

Grant.Argy replied on Thursday, September 21, 2006

Except as explained initially I don't put every role authorization rule in as there are about 100,000 I only put in the rules related to the user

JoeFallon1 replied on Thursday, September 21, 2006

Hi,

Is this a WinForms or Web app?

It is not clear what "cache" you are talking about. Could you briefly outline the process for logging in, what rules get written where and how you currently "clear the cache"? What does your code look like? How does your custom Principal object fit into this equation? It has the list of Roles (and permissions?).

My best guess is that you are going to be stuck modifying the framework unless you can convince Rocky to change the way some of these classes are written. He is open to suggestions so if you can present things in a way that would allow you to derive from his class and then override a method he would consider it. He has really made CSLA 2.x much more extensible than 1.x.

Joe

 

Copyright (c) Marimer LLC