I have Read only collection TradeRequestList : ReadOnlyListBase<TradeRequestList, TradeRequestInfo> and TradeRequestInfo: ReadOnlyBase<TradeRequestInfo>.
In class TradeRequestInfo i override method
protected override void AddBusinessRules()
BusinessRules.AddRule(new Csla.Rules.CommonRules.IsInRole(Csla.Rules.AuthorizationActions.ReadProperty, RegistrationDateProperty, "Admin"));
What best way for check this rule for RegistrationDateProperty?
I need hide column in table for this list if RegistrationDateProperty don't accessible for current user.
The UI code can call the business object's CanReadProperty method to find out whether the current user is allowed to read a specific property.
This is discussed in the Using CSLA 4: Creating Business Objects ebook.
CanReadProperty business object's method, but whether can to know rules for static?
Per-property rules are per-instance, not per-type. There is no built-in way to manage property permissions on a per-type (static) level. You'll have to invent a standard for that yourself.
Thanks for answer
Copyright (c) Marimer LLC