Source/NFX/Security/Permissions.cs
/// <summary>
/// Checks the permission for requested action as specified in particular permission .ctor.
/// The check is performed in the scope of supplied session, or if no session was supplied then
///  current execution context session is assumed
/// </summary>
/// <returns>True when action is authorized, false otherwise</returns>
Checks the permission for requested action as specified in particular permission .ctor.
The check is performed in the scope of supplied session, or if no session was supplied then
current execution context session is assumed
Checks the permission for requested action as specified in particular permission . ctor . The check is performed in the scope of supplied session or if no session was supplied then current execution context session is assumed
public virtual bool Check(ISession sessionInstance = null)
            {
              var session = sessionInstance ?? ExecutionContext.Session ?? NOPSession.Instance;
              var user = session.User;
              if (user.Status==UserStatus.System) return true;
              var manager = App.SecurityManager;
              var access = manager.Authorize(user, this);
              if (access==null) return false;
              return DoCheckAccessLevel(session, access);
            }
public virtual bool Check ( ISession sessionInstance = null ) { var session = sessionInstance ?? ExecutionContext . Session ?? NOPSession . Instance ; var user = session . User ; if ( user . Status == UserStatus . System ) return true ; var manager = App . SecurityManager ; var access = manager . Authorize ( user , this ) ; if ( access == null ) return false ; return DoCheckAccessLevel ( session , access ) ; }
Checks the permission for requested action as specified in particular permission .ctor.
Checks the permission for requested action as specified in particular permission . ctor .
//System user passes all permission checks
True when action is authorized, false otherwise
True when action is authorized false otherwise
sessionInstance
ISession