Hey,
I'm trying to add custom permissions in alfresco, I found this to be relevant actually :
https://community.alfresco.com/docs/DOC-5840-custom-permissions-in-share
When I tried it, I'm not able to get the desired result. But, by changing the sitePermissionDefinitions.xml directly inside the alfresco-repository-5.2.g.jar file which is located inside alfresco-community/tomcat/webapps/alfresco/WEB-INF/lib works fine. The problem with this approach is that, whenever I deploy an .amp file, the jar file gets overwritten and all the new permissions I created is gone.
Can anyone point me to the right direction on how this can be done.
Thank you
Solved! Go to Solution.
It is good that you are asking about this because any time you find yourself having to touch a file in the webapp you should stop and find a better way. Unfortunately, many people ignore that, just patch the JAR, and move on, which creates a mess for others to clean up later.
When you say, "I'm not able to get the desired result," what, exactly, is the problem? Are you seeing errors? If so, what are they?
You can definitely extend permissions without touching a core file. Maybe you created the permissions XML file but you forgot to wire it in to Spring with a bean, like:
It is good that you are asking about this because any time you find yourself having to touch a file in the webapp you should stop and find a better way. Unfortunately, many people ignore that, just patch the JAR, and move on, which creates a mess for others to clean up later.
When you say, "I'm not able to get the desired result," what, exactly, is the problem? Are you seeing errors? If so, what are they?
You can definitely extend permissions without touching a core file. Maybe you created the permissions XML file but you forgot to wire it in to Spring with a bean, like:
Hey Jeff,
Thanks for the reply.
I was going with the wrong approach all this while. Trying to patch the JAR file. Now I did extend the permissions and wired it in to the Spring bean. And it actually worked.
Thank you.
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.