Examples of BaseAuthorization


Examples of org.geomajas.security.BaseAuthorization

    String token = response.getToken();
    Assert.assertNotNull(token);

    Authentication auth = tokenService.getAuthentication(token);
    Assert.assertEquals(1, auth.getAuthorizations().length);
    BaseAuthorization authorizaton = auth.getAuthorizations()[0];
    Assert.assertTrue(authorizaton.isToolAuthorized("bla"));
    Assert.assertTrue(authorizaton.isCommandAuthorized("bla"));
    Assert.assertTrue(authorizaton.isLayerVisible("bla"));
    Assert.assertTrue(authorizaton.isLayerVisible("roads"));
    Assert.assertTrue(authorizaton.isLayerVisible("rivers"));
    Assert.assertTrue(authorizaton.isLayerUpdateAuthorized("bla"));
    Assert.assertTrue(authorizaton.isLayerCreateAuthorized("bla"));
    Assert.assertTrue(authorizaton.isLayerDeleteAuthorized("bla"));
  }
View Full Code Here

Examples of org.geomajas.security.BaseAuthorization

    String token = response.getToken();
    Assert.assertNotNull(token);

    Authentication auth = tokenService.getAuthentication(token);
    Assert.assertEquals(1, auth.getAuthorizations().length);
    BaseAuthorization authorizaton = auth.getAuthorizations()[0];
    Assert.assertFalse(authorizaton.isToolAuthorized("bla"));
    Assert.assertTrue(authorizaton.isCommandAuthorized("bla"));
    Assert.assertFalse(authorizaton.isLayerVisible("bla"));
    Assert.assertTrue(authorizaton.isLayerVisible("roads"));
    Assert.assertTrue(authorizaton.isLayerVisible("rivers"));
    Assert.assertFalse(authorizaton.isLayerUpdateAuthorized("bla"));
    Assert.assertFalse(authorizaton.isLayerCreateAuthorized("bla"));
    Assert.assertFalse(authorizaton.isLayerDeleteAuthorized("bla"));
  }
View Full Code Here

Examples of org.geomajas.security.BaseAuthorization

   * They are included here in serialized form.
   *
   * @param authorizations array of authentications
   */
  public void setAuthorizations(BaseAuthorization[] authorizations) {
    BaseAuthorization ba = null;
    try {
      this.authorizations = new byte[authorizations.length][];
      for (int i = 0; i < authorizations.length; i++) {
        ba = authorizations[i];
        ByteArrayOutputStream baos = new ByteArrayOutputStream(256);
View Full Code Here

Examples of org.geomajas.security.BaseAuthorization

  public void testLoginAllowedService() {
    LoginAllowedSecurityService service = new LoginAllowedSecurityService();
    Authentication auth = service.getAuthentication("bla");
    Assert.assertNotNull(auth);
    Assert.assertEquals(1, auth.getAuthorizations().length);
    BaseAuthorization authorization = auth.getAuthorizations()[0];
    Assert.assertTrue(authorization.isCommandAuthorized(LoginRequest.COMMAND));
    Assert.assertTrue(authorization.isCommandAuthorized(LogoutRequest.COMMAND));
    Assert.assertFalse(authorization.isCommandAuthorized("command.staticsecurity.Other"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.