You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Juan José Vázquez Delgado <ju...@gmail.com> on 2009/01/15 15:30:21 UTC

Custom privileges using jsr-283 developer preview

Hi,

I wonder if it´s possible to create custom privileges beside the regular
ones (jcr:read, jcr:write, etc). Obviously, being able to set them to ACEs
too.

Thanks in advance,

Juanjo.

Re: Custom privileges using jsr-283 developer preview

Posted by Juan José Vázquez Delgado <ju...@gmail.com>.
Hi Angela,


> first of all: in fact it should be 'Name'. that spec has changed
> in the mean time and requires privileges to be jcr-names.
>
> and yes: from the nt-definition you could set whatever you
> want. but if i remember correctly it is inhibited by the
> ACL/ACE implementation that validates the passed privileges
> according to the contract.
>
> and finally: even if you would write custom privileges to
> your content, they wouldn't be evaluated. most probably
> an exception will be raised or they will be simply ignored.
>
> that's the status as of today...
>

ok, i see.

Thanks,

BR,

Juanjo.

Re: Custom privileges using jsr-283 developer preview

Posted by Angela Schreiber <an...@day.com>.
hi juanjo

> The nodetype definition for "rep:ACE" is currently:
[...]
> The property "rep:privileges" has req requiredType="String". Does not that
> mean I could setting whatever privilege expressed as String?.

first of all: in fact it should be 'Name'. that spec has changed
in the mean time and requires privileges to be jcr-names.

and yes: from the nt-definition you could set whatever you
want. but if i remember correctly it is inhibited by the
ACL/ACE implementation that validates the passed privileges
according to the contract.

and finally: even if you would write custom privileges to
your content, they wouldn't be evaluated. most probably
an exception will be raised or they will be simply ignored.

that's the status as of today...

kind regards
angela

Re: Custom privileges using jsr-283 developer preview

Posted by Juan José Vázquez Delgado <ju...@gmail.com>.
Hi Angela,


I wonder if it´s possible to create custom privileges beside the regular
>> ones (jcr:read, jcr:write, etc). Obviously, being able to set them to ACEs
>> too.
>>
>
> no that's not possible currently.
>
>
The nodetype definition for "rep:ACE" is currently:

    <nodeType name="rep:ACE" isMixin="false" hasOrderableChildNodes="false"
primaryItemName="">
        <supertypes>
            <supertype>nt:base</supertype>
        </supertypes>
        <propertyDefinition name="rep:principalName" requiredType="String"
autoCreated="false" mandatory="true" onParentVersion="COPY" protected="true"
multiple="false" />
        <propertyDefinition name="rep:privileges" requiredType="String"
autoCreated="false" mandatory="true" onParentVersion="COPY" protected="true"
multiple="true" />
        <propertyDefinition name="rep:nodePath" requiredType="Path"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="true" multiple="false" />
        <propertyDefinition name="rep:glob" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="true" multiple="false" />
        <propertyDefinition name="*" requiredType="undefined"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="true" multiple="false" />
    </nodeType>

The property "rep:privileges" has req requiredType="String". Does not that
mean I could setting whatever privilege expressed as String?.

Thanks in advance,

BR,

Juanjo.

Re: Custom privileges using jsr-283 developer preview

Posted by Angela Schreiber <an...@day.com>.
hi juan

> I wonder if it´s possible to create custom privileges beside the regular
> ones (jcr:read, jcr:write, etc). Obviously, being able to set them to ACEs
> too.

no that's not possible currently.

regards
angela