Package org.sonatype.security.authorization

Examples of org.sonatype.security.authorization.ExceptionCatchingModularRealmAuthorizer


  @Test
  public void ignoreRuntimeException()
      throws Exception
  {
    ExceptionCatchingModularRealmAuthorizer subject =
        new ExceptionCatchingModularRealmAuthorizer(Collections.<Realm>singleton(BROKEN_REALM));

    Permission permission = new AllPermission();

    Assert.assertFalse(subject.isPermitted((PrincipalCollection) null, ""));
    Assert.assertFalse(subject.isPermitted((PrincipalCollection) null, permission));
    Assert.assertFalse(subject.isPermitted((PrincipalCollection) null, new String[]{""})[0]);
    Assert.assertFalse(subject.isPermitted((PrincipalCollection) null, Collections.singletonList(permission))[0]);
  }
View Full Code Here

TOP

Related Classes of org.sonatype.security.authorization.ExceptionCatchingModularRealmAuthorizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.