/// <summary> /// Authorizes user to specified permission. /// Note: this authorization call returns AccessLevel object that may contain a complex data structure. /// The final assertion of user's ability to perform a certain action is encapsulated in Permission.Check() method. /// Call Permission.AuthorizeAndGuardAction(MemberInfo, ISession) to guard classes and methods from unauthorized access /// </summary> public AccessLevel this[Permission permission] { get { return App.SecurityManager.Authorize(this, permission); } }
public AccessLevel Authorize(User user, Permission permission) { return new AccessLevel(user, permission, Rights.None.Root); }
public AccessLevel Authorize(User user, Permission permission) { if (user==null || permission==null) throw new SecurityException(StringConsts.ARGUMENT_ERROR+GetType().Name+".Authorize(user==null|permission==null)"); var node = user.Rights.Root.NavigateSection(permission.FullPath); return new AccessLevel(user, permission, node); }
public AccessLevel(User user, Permission permission, IConfigSectionNode data) { m_User = user; m_Permission = permission; m_Data = data; }
/// <summary> /// Authorizes user to specified permission. /// Note: this authorization call returns AccessLevel object that may contain a complex data structure. /// The final assertion of user's ability to perform a certain action is encapsulated in Permission.Check() method. /// Call Permission.AuthorizeAndGuardAction(MemberInfo, ISession) to guard classes and methods from unauthorized access /// </summary> public AccessLevel this[Permission permission] { get { return(App.SecurityManager.Authorize(this, permission)); } }
public static AccessLevel DeniedFor(User user, Permission permission) { return new AccessLevel(user, permission, DENIED_CONF); }
public AccessLevel Authorize(User user, Permission permission) { return(new AccessLevel(user, permission, Rights.None.Root)); }