public override AssertionResult Assert(TUserSecurityContext user)
            {
                var success = assertionFunc(user);
                var r       = new EffectivePermission()
                {
                    Allow         = success,
                    Policy        = Policy,
                    Permission    = this,
                    DenialMessage = success ? null : GetDenialMessage(user)
                };

                return(new AssertionResult(r));
            }
Ejemplo n.º 2
0
 internal AssertionResult(EffectivePermission PermissionResult)
 {
     Allow             = PermissionResult.Allow;
     DenialMessage     = PermissionResult.DenialMessage;
     DeniedPermissions = new[] { PermissionResult };
 }