LLBLGen 2.5 (yea team!)
SQL Server 2005
C#
I've already upgraded the project from 2.0 with no hiccups (so far).
I have an application with 50+ entities and am interested in implementing the LLBLGen Authorizer. However out of the 50+, there are probably 5 groups/roles in which I could narrow down the number of unique authorizers required.
I'm curious as to how best to setup the authorization classes.
While I could go through and setup a separate Authorizer class for each entity, it seems that could be tedious and error prone.
I don't currently envsion field level controls.
What I am considering is create a interface for each of the groups.
Create the interfaces as:
public interface IRoleAdmin {}
public interface IRoleDBAdmin {}
public interface IRoleOperations {}
public interface IRoleResearch {}
public interface IRoleStaff {}
// create partial classes that implement the interface
public partial class PersonEntity : IRoleAdmin {}
// repeat for the rest of the entities, grouping appropriately
// create the authorizers for each interface
[DependencyInjectionInfo(typeof (IRoleAdmin), "AuthorizerToUse",
ContextType = DependencyInjectionContextType.Singleton)]
public class DBAuthorizer : AuthorizerBase
{
// insert overrides here for actual Identity role memberships.
}
Then let DI handle the appropriate authorizers.
I am VERY open to suggestions, pitfalls and other ideas, this is just a thought...