Beispiel #1
0
 /// <summary>
 /// Processes an <see cref="AuthorizeTargetResult"/> for an <see cref="ISecurityTarget"> Actor</see> adding it to the AuthorizationFailures collection if appropriate
 /// </summary>
 /// <param name="result">Result to process</param>
 public void ProcessAuthorizeTargetResult(AuthorizeTargetResult result)
 {
     if (!result.IsAuthorized)
     {
         _authorizationFailures.Add(result);
     }
 }
        public AuthorizeTargetResult Authorize(object actionToAuthorize)
        {
            var result = new AuthorizeTargetResult(this);

            foreach (var securable in Securables)
            {
                result.ProcessAuthorizeSecurableResult(securable.Authorize(actionToAuthorize));
            }
            return(result);
        }