Authorizable getAuthorizable()

in src/main/java/org/apache/sling/pipes/internal/AuthorizablePipe.java [118:137]


    Authorizable getAuthorizable() throws RepositoryException {
        Authorizable auth = null;
        String authId = getExpr();
        if (StringUtils.isNotBlank(authId)) {
            logger.debug("try to find authorizable {}", authId);
            auth = userManager.getAuthorizable(authId);
            if (auth == null && createGroup) {
                logger.info("authorizable {} does not exist, and createGroup flag is set, creating it", authId);
                if (! isDryRun()) {
                    auth = userManager.createGroup(authId);
                }
            }
        } else {
            Resource resource = getInput();
            if (resource != null) {
                auth = userManager.getAuthorizableByPath(resource.getPath());
            }
        }
        return auth;
    }