Package com.getperka.flatpack.security

Examples of com.getperka.flatpack.security.SecurityGroup


              .entrySet()) {
            // If no actions are granted, ignore the group
            if (entry.getValue().isEmpty()) {
              continue;
            }
            SecurityGroup group = entry.getKey();
            if (securityGroups.getGroupAll().equals(group)
              || securityGroups.getGroupReflexive().equals(group)
              || limitGroupNames.contains(group.getName())) {
              return true;
            }
          }
          return false;
        }
View Full Code Here


      Class<? extends HasUuid> type = ensureReferent(typePolicy);
      if (type == null) {
        unresolved.add(typePolicy.getName());
        return;
      }
      SecurityGroup group = paths.isEmpty() ?
          securityGroups.getGroupEmpty() :
          securityGroups.getGroup(type, groupDefinition.getName().toString(),
              groupDefinition.toSource(), paths);
      x.setReferent(group);
      return;
View Full Code Here

  public boolean visit(AllowRule x) {
    Set<SecurityAction> set = setForIteration();
    for (Ident<SecurityAction> ident : x.getSecurityActions()) {
      set.add(ident.getReferent());
    }
    SecurityGroup group = x.getGroupName().getReferent();
    accumulator.addPermissions(group, set);
    return false;
  }
View Full Code Here

    checkMerchantPermissions(p);
  }

  private void checkMerchantPermissions(GroupPermissions p) {
    assertEquals(p.getOperations().toString(), 5, p.getOperations().size());
    SecurityGroup everybody = checkPermissions(p, "*");
    assertTrue(everybody.isGlobalSecurityGroup());

    checkPermissions(p, "merchantUser", "crudOperation.update");

    // integrator is initially defined as a global group, but then redefined in the merchant block
    SecurityGroup integratorUser = checkPermissions(p, "integratorUser",
        "crudOperation.create", "crudOperation.read",
        "crudOperation.update", "crudOperation.delete");
    assertFalse(integratorUser.isGlobalSecurityGroup());
    assertEquals("integratorUser", integratorUser.getPaths().get(0).getPath().get(0).getName());

    checkPermissions(p, "clerk", "crudOperation.read");
    SecurityGroup internalUser = checkPermissions(p, "internalUser", "*.*");
    assertTrue(internalUser.isGlobalSecurityGroup());
  }
View Full Code Here

TOP

Related Classes of com.getperka.flatpack.security.SecurityGroup

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.