You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2023/04/14 13:30:00 UTC
[jira] [Resolved] (SLING-5065) ResourceResolver not resolving any resources
[ https://issues.apache.org/jira/browse/SLING-5065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-5065.
-------------------------------------
Resolution: Won't Fix
> ResourceResolver not resolving any resources
> --------------------------------------------
>
> Key: SLING-5065
> URL: https://issues.apache.org/jira/browse/SLING-5065
> Project: Sling
> Issue Type: Bug
> Components: ResourceResolver
> Affects Versions: API 2.9.0
> Reporter: Roy Teeuwen
> Priority: Major
>
> I use following code to get a resource on a vanilla sling launchpad, but the resource returned is null. When using the getAdmininistrativeResourceResolver(null), everything works fine, but I would like a resource resolver bound to the rights of a user.
> Code:
> final Credentials creds = new SimpleCredentials("admin","admin".toCharArray());
> Session session = session = slingRepository.login(creds);
> Map<String, Object> authenticationInfo = new HashMap<String, Object>();
> authenticationInfo.put(JcrResourceConstants.AUTHENTICATION_INFO_SESSION, session);
> ResourceResolver resourceResolver = resourceResolverFactory.getResourceResolver(authenticationInfo);
> Resource resource = resourceResolver.getResource("/");
--
This message was sent by Atlassian Jira
(v8.20.10#820010)