Vibrant discussion about CSLA .NET and using the framework to build great business applications.
Hi,
I'm using CSLA 4.2 and the above subject is not working on my PC when i put something on the roles part. Did i miss something?
Below are sample code snippets:
protected static void AddObjectAuthorizationRules()
{
Csla.Rules.BusinessRules.AddRule(typeof(SomeClass), new Csla.Rules.CommonRules.IsInRole(AuthorizationActions.EditObject, "Foo"));
}
class AuthRule : AuthorizationRule
public AuthRule(AuthorizationActions action) : base(action) { }
protected override void Execute(AuthorizationContext context) {
context.HasPermission = true;
The EditObject authorization is only checked by the DataPortal when calling Save on an existing object.
Jonny Bekkum, Norway CslaContrib Coordinator
Hi JB,
Yes that's correct but my problem is when i place something on the roles part (2nd parameter), i.e. "Foo", seems like not working because the link to edit is not enabled. The system checks the role entered during log in and it will check again the role if it is allowed for editing. I have to check my code again though.
Thanks.