/** * Assert that the processor may operate upon the given objects with {@link Processor#processInstances(String, Collection)}. * Never fails for system types. * @param className a class name * @param ids instance IDs * @throws GraphException if the user does not have the necessary permissions for all of the objects */ private void assertMayBeProcessed(String className, Collection<Long> ids) throws GraphException { final Set<CI> objects = idsToCIs(className, ids); assertPermissions(objects, processor.getRequiredPermissions()); if (isCheckUserPermissions) { for (final CI object : Sets.difference(objects, planning.overrides)) { try { processor.assertMayProcess(object.className, object.id, planning.detailsNoted.get(object)); } catch (GraphException e) { throw new GraphException("cannot process " + object + ": " + e.message); } } } }
@Override public Set<Ability> getRequiredPermissions() { return processor.getRequiredPermissions(); }
@Override public Set<Ability> getRequiredPermissions() { return processor.getRequiredPermissions(); }