@Override public Set<String> permissionStrings() { Set<String> permissionStrings = new HashSet<String>(); for (RoleAssignment assignment : roleAssignee.roleAssignments()) { permissionStrings.addAll(assignment.role().get().permissions().get()); } return Collections.unmodifiableSet(permissionStrings); }
@Override public Set<String> roleNames() { Set<String> roleNames = new HashSet<String>(); for (RoleAssignment assignment : roleAssignee.roleAssignments()) { roleNames.add(assignment.role().get().name().get()); } return Collections.unmodifiableSet(roleNames); }
public RoleAssignment save(RoleAssignment assignment) { if (assignment.getId() == null) { em.persist(assignment); em.flush(); } else { assignment = em.merge(assignment); } /** @todo update permissionModificationTime here. */ IndexResponse indexDefinitionPountResult = indexDefinitionPoint(assignment.getDefinitionPoint()); logger.fine("output from indexing operations: " + indexDefinitionPountResult); return assignment; }
public void revoke(RoleAssignment ra) { if (!em.contains(ra)) { ra = em.merge(ra); } em.remove(ra); /** @todo update permissionModificationTime here. */ IndexResponse indexDefinitionPointResult = indexDefinitionPoint(ra.getDefinitionPoint()); logger.fine("indexing operation results: " + indexDefinitionPointResult); }
public RoleAssignment save(RoleAssignment assignment) { if (assignment.getId() == null) { em.persist(assignment); em.flush(); } else { assignment = em.merge(assignment); } /** @todo update permissionModificationTime here. */ indexAsync.indexRole(assignment); return assignment; }