/// <summary>
 /// Processes an <see cref="AuthorizeSecurableResult"/>, adding it to the collection of AuthorizationFailures if appropriate
 /// </summary>
 /// <param name="result">An <see cref="AuthorizeSecurableResult"/> for a <see cref="ISecurable"/></param>
 public void ProcessAuthorizeSecurableResult(AuthorizeSecurableResult result)
 {
     if (!result.IsAuthorized)
     {
         _authorizationFailures.Add(result);
     }
 }
Example #2
0
        public virtual AuthorizeSecurableResult Authorize(object actionToAuthorize)
        {
            var result = new AuthorizeSecurableResult(this);

            foreach (var actor in _actors)
            {
                result.ProcessAuthorizeActorResult(actor.IsAuthorized(actionToAuthorize));
            }
            return(result);
        }