AnsweredAssumed Answered

Permission API

Question asked by spring777 on Nov 9, 2011
Latest reply on Nov 18, 2011 by rudyantolin
Hi everyone,

Suppose the following code :


<#if user.isAdmin>
<span><a href="${url.context}/proxy/alfresco${version.downloadURL}" class="download">${msg("link.download")}</a></span>
</#if>

I am looking for a similar expression that make display the span only if the user role for the current node is different from a role X (added role) which is supposed to be a consumer without the download ability

I tried all combinations of the userhome and permissions objects but I got always something like this :


Exception: freemarker.core.InvalidReferenceException - Expression userhome is undefined on line 45, column 38 in org/alfresco/components/document-details/document-versions.get.html.ftl.
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
….

Outcomes