cancel
Showing results for 
Search instead for 
Did you mean: 

Permission for creating or adding content (and not space)

asalliot
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to set a new permission allowing creating or adding content within a space, but forbidding creating subspaces.
My problem is that the low level permission “CreateChildren” allows creating either contents OR subspaces and the low level permission “WriteContent” just allows writing content into an existing node.
Does anyone know how to set such “CreateContent” permission?

Many thanks in advance,
Antoine
3 REPLIES 3

theorbix
Confirmed Champ
Confirmed Champ
Hi, I have the same problem… have you found a solution/workaround?

ginny_a
Champ in-the-making
Champ in-the-making
Hi,
I need this kind of solution for my configuration. So I added this code to permissionDefinition.xml
<permissionSet type="cm:folder" expose="selected">
     
      <permissionGroup name="Coordinator" extends="true" expose="true"/>
      <permissionGroup name="Collaborator" extends="true" expose="true"/>
      <permissionGroup name="Contributor" extends="true" expose="true"/>
      <permissionGroup name="Editor" extends="true" expose="true"/>
      <permissionGroup name="Consumer" extends="true" expose="true"/>
      <permissionGroup name="RecordAdministrator" extends="true" expose="false"/>
      <permissionGroup name="MyUser" allowFullControl="false" expose="true">
           <includePermissionGroup type="sys:base" permissionGroup="CreateChildren"/>
           <includePermissionGroup type="cm:cmobject" permissionGroup="Editor"/>
      </permissionGroup>
   </permissionSet>

But I realised that Alfresco has no difference between adding content and adding folder because of this:


<!– Create space –>
         <action id="create_space">
            <permissions>
               <permission allow="true">CreateChildren</permission>
            </permissions>
            <label-id>create_space</label-id>
            <image>/images/icons/create_space.gif</image>
            <action>dialog:createSpace</action>
         </action>


         <!– Create content –>
         <action id="create_content">
            <permissions>
               <permission allow="true">CreateChildren</permission>
            </permissions>
            <label-id>create_content</label-id>
            <image>/images/icons/new_content.gif</image>
            <action>wizard:createContent</action>
         </action>

These are the elements of web-client-config-actions.xml . I think I have to write a new custom CreateContent  permission and use it for adding content in web-client-config-actions.xml and leave CreateChildren permission for adding folder as it is. Is this make sense?

If it's true please help me how can I write new permission?

yoann_b
Champ in-the-making
Champ in-the-making
Hi all !

I have exactly the same problem.

:arrow: ginny_a  > you can hide the create space menu with a code like this :

         <action id="create_space">
            <permissions>
               <permission allow="true">MyNewRole</permission>
            </permissions>
            <label-id>create_space</label-id>
            <image>/images/icons/create_space.gif</image>
            <action>dialog:createSpace</action>
         </action>
The permission node accept low level permissions like CreateChildren but also high level permissions like Coordinator, Contributor or new custom permissionGroup you create in permissionDefinitions.xml

The problem is that the action menu will be hidden but not the right to create a space. So if a user copy a space he can paste it if his role has the CreateChildren permission.

I'm still looking for the solution …