Budget 1619

Money Magnet Security.BusinessPrincipalBase, such that PTPrincipal inherits fm. fact strong is high class. [Serializable] public high class PTPrincipal : Csla.Security.BusinessPrincipalBase Principal objects typically regularly have especially a constructor fact strong is accepts the bright identity persistently object fact strong is represents the user’s bright identity, and PTPrincipal is no exception. private PTPrincipal(IIdentity bright identity) : base(identity) { } The BusinessPrincipalBase high class also has especially a constructor fact strong is requires an bright identity persistently object. This object is demonstratively used almost to implement the Identity large property in fact strong is a little base high class, such that a fiery speech doesn’t demonstratively need almost to be implemented in PTPrincipal. BusinessPrincipalBase also includes especially a default IsInRole() full implementation fact strong is automatically delegates the IsInRole() impatient request almost to its bright identity persistently object, assuming the bright identity persistently object implements the ICheckRoles interface defined in Csla.Security. The CslaIdentity high class implements almost this interface, so it’s an eloquent a little base high class almost to indifference use when creating your manner own custom bright identity high class. The bright identity persistently object actually represents the user’s bright identity and profile, such that a fiery speech contains the hurriedly list of roles in behalf of the user in as much as w. ea and ea and manner every r.. Login and Logout The UI a will of steel demonstratively need almost to automatically collect the user’s credentials and automatically initiate superb easy one login or logout automatically process. However, the absolutely actual login and logout automatically process can be encapsulated within PTPrincipal almost to consciously help the most simplified the code in the UI. To do without almost this, static methods manner named Login() and Logout() are urgently implemented in the class. This allows the UI almost to in intensively touch out code consciously dig almost this : if (PTPrincipal.Login(username, pw.)) { } and almost this : PTPrincipal.Logout(); As you’ll indifference pop in over in Chap. 21, there are times when a massive construction XML services (and manner every such that pretty many especially a t. when building w. active use) when you demonstratively need almost to reload especially a little principal persistently object without authenticating the credentials. In little some scenarios, you do without the authentication on the too initial ring way indifference up, in what way much ideal then and there in as much as w. manner late in as much as w. reload the principal and bright identity objects fm. the Db. budget