Examples of removePermission()


Examples of org.camunda.bpm.engine.authorization.Authorization.removePermission()

    // revoke READ for group "sales"
    Authorization groupRevoke = authorizationService.createNewAuthorization(AUTH_TYPE_REVOKE);
    groupRevoke.setGroupId("sales");
    groupRevoke.setResource(resource1);
    groupRevoke.setResourceId(ANY);
    groupRevoke.removePermission(READ);
    authorizationService.saveAuthorization(groupRevoke);

    List<String> jonnysGroups = Arrays.asList(new String[]{"sales", "marketing"});
    List<String> someOneElsesGroups = Arrays.asList(new String[]{"marketing"});
View Full Code Here

Examples of org.camunda.bpm.engine.authorization.Authorization.removePermission()

    // revoke READ for group "sales"
    Authorization groupRevoke = authorizationService.createNewAuthorization(AUTH_TYPE_REVOKE);
    groupRevoke.setGroupId("sales");
    groupRevoke.setResource(resource1);
    groupRevoke.setResourceId(ANY);
    groupRevoke.removePermission(READ);
    authorizationService.saveAuthorization(groupRevoke);

    // add READ for jonny
    Authorization userGrant = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT);
    userGrant.setUserId("jonny");
View Full Code Here

Examples of org.camunda.bpm.engine.authorization.Authorization.removePermission()

    // create global authorization which revokes all permissions to all users  (on resource1):
    Authorization globalGrant = authorizationService.createNewAuthorization(AUTH_TYPE_GLOBAL);
    globalGrant.setResource(resource1);
    globalGrant.setResourceId(ANY);
    globalGrant.removePermission(ALL);
    authorizationService.saveAuthorization(globalGrant);

    // add READ for jonny
    Authorization localRevoke = authorizationService.createNewAuthorization(AUTH_TYPE_GRANT);
    localRevoke.setUserId("jonny");
View Full Code Here

Examples of org.camunda.bpm.engine.authorization.Authorization.removePermission()

    // add base permission which allows nobody to create authorizations
    Authorization basePerms = authorizationService.createNewAuthorization(AUTH_TYPE_GLOBAL);
    basePerms.setResource(AUTHORIZATION);
    basePerms.setResourceId(ANY);
    basePerms.addPermission(ALL); // add all then remove 'crate'
    basePerms.removePermission(CREATE);
    authorizationService.saveAuthorization(basePerms);

    // now enable authorizations:
    processEngineConfiguration.setAuthorizationEnabled(true);
    identityService.setAuthenticatedUserId(jonny2);
View Full Code Here

Examples of org.camunda.bpm.engine.authorization.Authorization.removePermission()

    // create global auth
    Authorization basePerms = authorizationService.createNewAuthorization(AUTH_TYPE_GLOBAL);
    basePerms.setResource(AUTHORIZATION);
    basePerms.setResourceId(ANY);
    basePerms.addPermission(ALL);
    basePerms.removePermission(DELETE); // revoke delete
    authorizationService.saveAuthorization(basePerms);
   
    // turn on authorization
    processEngineConfiguration.setAuthorizationEnabled(true);   
    identityService.setAuthenticatedUserId(jonny2);
View Full Code Here

Examples of org.camunda.bpm.engine.authorization.Authorization.removePermission()

    // create global auth
    Authorization basePerms = authorizationService.createNewAuthorization(AUTH_TYPE_GLOBAL);
    basePerms.setResource(AUTHORIZATION);
    basePerms.setResourceId(ANY);
    basePerms.addPermission(ALL);
    basePerms.removePermission(UPDATE); // revoke update
    authorizationService.saveAuthorization(basePerms);
   
    // turn on authorization
    processEngineConfiguration.setAuthorizationEnabled(true);   
    identityService.setAuthenticatedUserId(jonny2);
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity.removePermission()

    AuthorizationEntity authorization = new AuthorizationEntity(AUTH_TYPE_REVOKE);
    assertFalse(authorization.isPermissionRevoked(ALL));
    List<Permission> perms = Arrays.asList(authorization.getPermissions(Permissions.values()));
    assertEquals(0, perms.size());

    authorization.removePermission(READ);
    perms = Arrays.asList(authorization.getPermissions(Permissions.values()));
    assertTrue(perms.contains(READ));
    assertTrue(perms.contains(ALL));
    assertEquals(2, perms.size());
View Full Code Here

Examples of org.exoplatform.services.jcr.core.ExtendedNode.removePermission()

   public void testGetFileFromFolder() throws Exception
   {
      ExtendedNode folderA = (ExtendedNode)session.getRootNode().addNode("folderA", "nt:folder");
      folderA.addMixin("exo:privilegeable");
      folderA.setPermission("john", PermissionType.ALL);
      folderA.removePermission(IdentityConstants.ANY);
      session.save();
     
      assertEquals(4, folderA.getACL().getPermissionEntries().size());
      assertEquals("john read", folderA.getACL().getPermissionEntries().get(0).getAsString());
      assertEquals("john add_node", folderA.getACL().getPermissionEntries().get(1).getAsString());
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.NodeImpl.removePermission()

      maryNode.addMixin("exo:privilegeable");
      if (!session.getUserID().equals("mary"))
      {
         maryNode.setPermission("*:/platform/users", new String[] {PermissionType.READ});
         maryNode.setPermission("mary", PermissionType.ALL);
         maryNode.removePermission(session.getUserID());
      }
      maryNode.removePermission(SystemIdentity.ANY);
      testRoot.save();

      Session marySession =
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.NodeImpl.removePermission()

      {
         maryNode.setPermission("*:/platform/users", new String[] {PermissionType.READ});
         maryNode.setPermission("mary", PermissionType.ALL);
         maryNode.removePermission(session.getUserID());
      }
      maryNode.removePermission(SystemIdentity.ANY);
      testRoot.save();

      Session marySession =
                  repository.login(new CredentialsImpl("mary", "exo".toCharArray()), session.getWorkspace().getName());
      NodeImpl myNode = (NodeImpl) marySession.getItem(maryNode.getPath());
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.