using LLB within Authorizers

Posts   
 
    
neilx
User
Posts: 267
Joined: 02-Nov-2007
# Posted on: 12-Jun-2011 14:56:51   

2.6.10.809 (SD.LLBLGen.Pro.LinqSupportClasses.NET35.dll) 2.6.10.930 (SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll) 2.6.10.917 (SD.LLBLGen.Pro.DQE.SqlServer.NET20.dll)

Say my authorizer needs to check other entities to decide if the current entity is authorized or not, can I get to them easily or do need to create a fresh adapter and do the accessing of other entities like a normal application.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 12-Jun-2011 22:58:59   

Everything you need to authorize should be managed separately. All you have to do this is the entity/field passed to the relevant authorization method and other information you have (i.e. the Current.Principal). So if you depend on other entities to authorize some entity, you should have some method that fetch such entities and decide whether the involved entity is or isn't authorized.

David Elizondo | LLBLGen Support Team
neilx
User
Posts: 267
Joined: 02-Nov-2007
# Posted on: 13-Jun-2011 07:48:24   

Thanks. I have done that in the meantime and it works just fine.