AnsweredAssumed Answered

Permissions Granted When Aspect Is Apllied

Question asked by alejandrogarciaseco on Feb 4, 2014
Latest reply on Feb 4, 2014 by jpotts
Hi folks,

I know this and issue that has been addressed several times in the forums:

And there is also some documentations that tackles the matter:….

In few words, I'm trying to grant existing permission group 'CreateChildren' to 'Consumer' if a specific aspect is applied. This is what I have added to my custom 'permissionDefinitios.xml' (I have omitted default XML content):

1. Import my custom namespace.

        <namespace uri="" prefix="sys"/>
        <namespace uri="" prefix="cm"/>
        <namespace uri="" prefix="wcm"/>
        <namespace uri="" prefix="wca"/>
        <namespace uri="" prefix="my"/>

2. Define a permission group for 'my:aspect' aspect. I want this permission group to include the existing 'CreateChildren' permission group.

    <permissionSet type="my:aspect" expose="selected">
        <permissionGroup name="CreateComments" requiresType="true" expose="false">
            <includePermissionGroup permissionGroup="CreateChildren" type="sys:base" />

3. Grant the previously defined permission group to the 'Consumer' role for type 'my:aspect'.

        <!– The Consumer permission allows read to everything by default.                  –>
        <permissionGroup name="Consumer" allowFullControl="false" expose="true" >
            <includePermissionGroup type="sys:base" permissionGroup="Read"/>
            <includePermissionGroup type="my:aspect" permissionGroup="CreateComment"/>

The result of this setup is that users with 'Consumer' role can create children in any site by default, regardless the aspect is applied on the node or not. Am I doing anything wrong? Is this the result expected for such configuration?

Since I taken the 'ownable' model or example, I'm wondering whether the problem might be the fact that I'm using the existing permission 'CreateChildren' instead of completely defining custom low level permissions and permission groups. I have also noticed that there is a service for the 'ownable' aspect, might I need to implement my service as well? I don't so, since this service looks to have to with policies implementation, which I think I don't as far as I'm concerned.