Hi Angela,
thanks a lot for your reply. Yes, I thought using my own property to store
the creation date would be best, but never considered using an
AuthorizableAction.
I will take a look into it.

Best Regards.
Jorge


El mar., 16 de febrero de 2021 2:45 a. m., Angela Schreiber
<anch...@adobe.com.invalid> escribió:

> Hi Jorge
>
> Your observation is correct: Authorizable.getProperty filters out
> properties in the jcr or rep namespace and only returns properties that
> could also be set using Authorizable.setProperty.
>
> If you add mix:created to a given user node (IMHO that is allowed) to have
> the jcr:created property set, you need to get the user node to read the
> jcr:created property. Alternatively, if you wish to avoid having that
> implementation detail (i.e. user is stored as a node) in your application,
> I suggest using a custom 'AuthorizableAction' that sets a custom 'created'
> property upon user creation.
>
> see
> http://jackrabbit.apache.org/oak/docs/security/user/authorizableaction.html
> for the corresponding documentation. NOTE: i recently fixed that part of
> the documentation. it missed to point to the required-service-ids in the
> security provider (see
> http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/security/user/authorizableaction.md?r1=1846652&r2=1885915).
> that is necessary in order to make sure the security provider is only
> registered if all dependencies are properly registered.
>
> Hope that helps
> Angela
>
> ________________________________
> From: jorgeeflorez <jorgeeduardoflo...@gmail.com>
> Sent: Thursday, February 11, 2021 8:37 PM
> To: oak-dev@jackrabbit.apache.org <oak-dev@jackrabbit.apache.org>
> Subject: User created date property
>
> Hi,
> I need to put and use additional properties on users and so far no problems
> with those properties. I could even add a mixin to the node that represents
> the user! (I am not sure if this is allowed).
>
> It seems that the "jcr:created" property cannot be seen using
> Authorizable.getProperty method. Should I get the node using the
> autorizable's path and get the property? or should I handle a custom
> property for that in this case? I just want to get the date the user was
> created...
>
> Thanks.
>
> Jorge
>

Reply via email to