I think you can get close to that with the existing code. For example,
there is an AuthorizableResourceProvider implementation in
the org.apache.sling.jcr.jackrabbit.usermanager bundle that makes the users
and groups addressable as a resource. If you are using that technique,
then the URI of the AuthorizableResource
(/system/userManager/user/username) could be the address of the resource
and you could simply deploy a script to /libs/sling/user/html.html (or
equivalent in whatever scripting language you prefer) to render the view of
the user. Inside your rendering script you can follow the "path" property
of the AuthorizableResource to get at the home folder data of the user (or
group) for rendering purposes.
That would result in an path like below that would delegate to your
rendering script:
/system/userManager/user/username.html
With the SLING-9810 enhancement (in version 2.2.12 or later), the root path
for the AuthorizableResourceProvider can be re-configured to make the paths
a bit prettier with a configuration that looks something like this:
"org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider":{
"provider.root":"/~"
}
Which would result in an path like below that would delegate to your
rendering script:
/~/user/username.html
Regards,
-Eric
On Wed, Apr 14, 2021 at 6:12 AM Cris Rockwell <[email protected]> wrote:
> Hi
>
> I want my app to render a webpage from the users directory
> such that a resource (homepage) with a path like this
> /home/users/saml/iZDWvQAJAqrroO8jkD8h6/homepage.html
> maps to
> /~username.html
>
> (in the style of early unix personal homepages)
>
> I tried setting a property sling:vanityPath {String} to /~username, but
> that’s not working.
>
> Let me know your ideas.
>
> Thanks
> Cris
>
>