You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2012/09/14 16:10:08 UTC

[jira] [Updated] (SLING-2599) Implement functionality to easily access a user's home folder

     [ https://issues.apache.org/jira/browse/SLING-2599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-2599:
-------------------------------------

    Description: 
Users will generally be managed in the JCR Repository. When using the Jackrabbit Repository the user's storage node can be accessed by the ItemBasedPrincipal backing the User.

Since the implementation of the user's location is configuration or even implementation dependent there is no easy way to create a correct URL to the user's home location.

To fix this, we should implementat functionality to give easy access to the user's home location at a canonical URL (and thus Resource) such as /~userid or /users/userid.

The simplest implementation probably is using a ResourceProvider properly configured which does:

  * the user ID is part of the path given to the ResourceProvider.getResource method
  * adapt ResourceResolver to the Session of the authenticated user
  * --> no resource if no Session
  * Get the User from the UserManager
  * Get the Principal from the User
  * --> no resource If the Principal is not an ItemBasedPrincipal 
  * get the path from the ItemBasedPrincipal
  * retrieve the item through the user's own session (to apply access control)
  * use the AdapterManager to adapt the Item to a Resource
  * --> return the Resource

  was:
Users will generally be managed in the JCR Repository. When using the Jackrabbit Repository the user's storage node can be accessed by the ItemBasedPrincipal backing the User.

Since the implementation of the user's location is configuration or even implementation dependent there is no easy way to create a correct URL to the user's home location.

To fix this, we should implementat functionality to give easy access to the user's home location at a canonical URL (and thus Resource) such as /~userid or /users/userid.

The simplest implementation probably is using a ResourceProvider properly configured which does:

  * adapt ResourceResolver to the Session of the authenticated user
  * --> no resource if no Session
  * Get the User from the UserManager
  * Get the Principal from the User
  * --> no resource If the Principal is not an ItemBasedPrincipal 
  * get the path from the ItemBasedPrincipal
  * retrieve the item through the user's own session (to apply access control)
  * use the AdapterManager to adapt the Item to a Resource
  * --> return the Resource

    
> Implement functionality to easily access a user's home folder
> -------------------------------------------------------------
>
>                 Key: SLING-2599
>                 URL: https://issues.apache.org/jira/browse/SLING-2599
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR
>            Reporter: Felix Meschberger
>
> Users will generally be managed in the JCR Repository. When using the Jackrabbit Repository the user's storage node can be accessed by the ItemBasedPrincipal backing the User.
> Since the implementation of the user's location is configuration or even implementation dependent there is no easy way to create a correct URL to the user's home location.
> To fix this, we should implementat functionality to give easy access to the user's home location at a canonical URL (and thus Resource) such as /~userid or /users/userid.
> The simplest implementation probably is using a ResourceProvider properly configured which does:
>   * the user ID is part of the path given to the ResourceProvider.getResource method
>   * adapt ResourceResolver to the Session of the authenticated user
>   * --> no resource if no Session
>   * Get the User from the UserManager
>   * Get the Principal from the User
>   * --> no resource If the Principal is not an ItemBasedPrincipal 
>   * get the path from the ItemBasedPrincipal
>   * retrieve the item through the user's own session (to apply access control)
>   * use the AdapterManager to adapt the Item to a Resource
>   * --> return the Resource

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira