Source/NFX/Security/Permissions.cs
/// <summary>
/// Guards the action represented by MemberInfo by checking the permission-derived attributes and throwing exception if
/// any of authorization attributes do not pass
/// </summary>
Guards the action represented by MemberInfo by checking the permission-derived attributes and throwing exception if
any of authorization attributes do not pass
Guards the action represented by MemberInfo by checking the permission - derived attributes and throwing exception if any of authorization attributes do not pass
public static void AuthorizeAndGuardAction(MemberInfo actionInfo, ISession session = null, GetSessionFunc getSessionFunc = null)
           {
             var failed = FindAuthorizationFailingPermission(actionInfo, session, getSessionFunc);
             if (failed!=null)
               throw new AuthorizationException(string.Format(StringConsts.SECURITY_AUTHROIZATION_ERROR, failed,  actionInfo.ToDescription()));
           }
public static void AuthorizeAndGuardAction ( MemberInfo actionInfo , ISession session = null , GetSessionFunc getSessionFunc = null ) { var failed = FindAuthorizationFailingPermission ( actionInfo , session , getSessionFunc ) ; if ( failed != null ) throw new AuthorizationException ( string . Format ( StringConsts . SECURITY_AUTHROIZATION_ERROR , failed , actionInfo . ToDescription ( ) ) ) ; }
Guards the action represented by MemberInfo by checking the permission-derived attributes and throwing exception if
any of authorization attributes do not pass
Guards the action represented by MemberInfo by checking the permission - derived attributes and throwing exception if any of authorization attributes do not pass
actionInfo
MemberInfo
session
ISession
getSessionFunc
GetSessionFunc