You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Special Monkey <sp...@gmail.com> on 2020/11/13 20:27:26 UTC

Creating Users Within A Specific Path

Hello, We're using Oak 1.6.11 and Adobe CRX - I know it's a longshot, but
I'm hoping to get some info here (have exhausted Adobe Support).

It looks like the methods creating users in this case is using :

((JackrabbitSession)serviceSession).getUserManager(); - [ seems to be
jackrabbit code]

createUser [ not sure if this is sling ]

and possibly an Adobe specific function (being purposefully brief here with
restricted code).

In any event the code in question creates users in a default location, I
cannot find it listed in the class, but I'd like to extend that class to a
new class, and create the users in a more specific path of the default
location,

do any of the listed methods have the ability to specify a location?

Thanks for any info!

Re: Creating Users Within A Specific Path

Posted by Angela Schreiber <an...@adobe.com.INVALID>.
Hi

Note, that the 4th param only specifies the intermediate path to the user node. The name of the user node itself is an implementation detail. However, you can tweak that by configuring an AuthorizableNodeName implementation.

See http://jackrabbit.apache.org/oak/docs/security/user/authorizablenodename.html for details.

I just noticed that the documentation is a bit outdated. It should mention that a custom implementation needs to be listed as required services with the SecurityProviderRegistration as mentioned in http://jackrabbit.apache.org/oak/docs/security/introduction.html#Configuration

Hope that helps
Angela
________________________________
From: Justin Edelson <ju...@justinedelson.com>
Sent: Saturday, November 14, 2020 7:49 PM
To: users <us...@jackrabbit.apache.org>
Subject: Re: Creating Users Within A Specific Path

Hi,
Your email is a bit vague (seemingly on purpose), but take a look at

https://jackrabbit.apache.org/api/2.12/org/apache/jackrabbit/api/security/user/UserManager.html#createUser(java.lang.String,%20java.lang.String,%20java.security.Principal,%20java.lang.String)

The fourth argument to that method allows you to specify an "intermediate
path"; this may or may not do what you want.

Regards,
Justin

On Fri, Nov 13, 2020 at 3:29 PM Special Monkey <sp...@gmail.com>
wrote:

> Hello, We're using Oak 1.6.11 and Adobe CRX - I know it's a longshot, but
> I'm hoping to get some info here (have exhausted Adobe Support).
>
> It looks like the methods creating users in this case is using :
>
> ((JackrabbitSession)serviceSession).getUserManager(); - [ seems to be
> jackrabbit code]
>
> createUser [ not sure if this is sling ]
>
> and possibly an Adobe specific function (being purposefully brief here with
> restricted code).
>
> In any event the code in question creates users in a default location, I
> cannot find it listed in the class, but I'd like to extend that class to a
> new class, and create the users in a more specific path of the default
> location,
>
> do any of the listed methods have the ability to specify a location?
>
> Thanks for any info!
>

Re: Creating Users Within A Specific Path

Posted by Justin Edelson <ju...@justinedelson.com>.
Hi,
Your email is a bit vague (seemingly on purpose), but take a look at

https://jackrabbit.apache.org/api/2.12/org/apache/jackrabbit/api/security/user/UserManager.html#createUser(java.lang.String,%20java.lang.String,%20java.security.Principal,%20java.lang.String)

The fourth argument to that method allows you to specify an "intermediate
path"; this may or may not do what you want.

Regards,
Justin

On Fri, Nov 13, 2020 at 3:29 PM Special Monkey <sp...@gmail.com>
wrote:

> Hello, We're using Oak 1.6.11 and Adobe CRX - I know it's a longshot, but
> I'm hoping to get some info here (have exhausted Adobe Support).
>
> It looks like the methods creating users in this case is using :
>
> ((JackrabbitSession)serviceSession).getUserManager(); - [ seems to be
> jackrabbit code]
>
> createUser [ not sure if this is sling ]
>
> and possibly an Adobe specific function (being purposefully brief here with
> restricted code).
>
> In any event the code in question creates users in a default location, I
> cannot find it listed in the class, but I'd like to extend that class to a
> new class, and create the users in a more specific path of the default
> location,
>
> do any of the listed methods have the ability to specify a location?
>
> Thanks for any info!
>