Is there a standard way to allow Consumers (repo permission) the ability to comment on documents?
We are trying to extend the default Consumer role so that Consumer users can create comments. We have added the following code to our permissionDefinitions.xml but to no avail.
permissionDefinitions.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE permissions >
<permissions>
<namespaces>
<namespace uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
<namespace uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<namespace uri="http://www.alfresco.org/model/forum/1.0" prefix="fm"/>
</namespaces>
<permissionSet type="fm:discussable" expose="selected">
<permissionGroup name="CreateComments" requiresType="true" expose="false">
<includePermissionGroup permissionGroup="CreateChildren" type="sys:base" />
</permissionGroup>
<permission name="_CreateComments" expose="false" >
<grantedToGroup permissionGroup="CreateComments" />
</permission>
</permissionSet>
<permissionSet type="fm:discussable" expose="selected">
<permissionGroup name="Consumer" allowFullControl="false" expose="true" >
<includePermissionGroup type="sys:base" permissionGroup="Read"/>
<includePermissionGroup type="fm:discussable" permissionGroup="CreateComments"/>
</permissionGroup>
</permissionSet>
</permissions>
And imported it to our module-context.xml using:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="extendPermissionModel" parent="permissionModelBootstrap">
<property name="model" value="alfresco/module/${project.artifactId}/permission/permissionDefinitions.xml" />
</bean>
</beans>
Solved! Go to Solution.
Gave up and just created a separate role instead of trying to extend Consumer
Check the following thread https://community.alfresco.com/thread/212273-howto-custom-permissions-in-alf-community-50d#comment-7...
It is old, but I believe it is still relevant for what you are trying to achieve.
We have also tried replacing the default permissionDefinitions.xml file also. Either we just get errors that CreateComment is not available for sys:base or cm:content and just adding the following to the file gives Access Denied using the REST call for adding comments.
<!-- CUSTOM CREATE COMMENTS -->
<permissionSet type="fm:discussable" expose="selected">
<permissionGroup name="CreateComments" extends="false" expose="false" />
<permissionGroup name="ReadComments" extends="false" expose="false" />
<permission name="_CreateComments" expose="false" >
<grantedToGroup permissionGroup="CreateComments" />
</permission>
<permission name="_ReadComments" expose="false" >
<grantedToGroup permissionGroup="ReadComments" />
</permission>
</permissionSet><permissionSet type="cm:cmobject" expose="selected">...
<permissionGroup name="Consumer" allowFullControl="false" expose="true" >
<includePermissionGroup permissionGroup="Read" type="sys:base" />
<includePermissionGroup permissionGroup="CreateComments" type="fm:discussable" />
</permissionGroup>
Gave up and just created a separate role instead of trying to extend Consumer
Hello Mike,
Can you tell me how you created this separate role? Especially how you grant (what) permissions to this role?
Thanks in advance
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.