11-09-2011 10:45 AM
<#if user.isAdmin>
<span><a href="${url.context}/proxy/alfresco${version.downloadURL}" class="download">${msg("link.download")}</a></span>
</#if>
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)
….
11-15-2011 11:35 AM
model.permissions = AlfrescoUtil.getSiteMembership(model.site).role ;
<#if permissions!="SiteConsumer" >
<span><a href="${url.context}/proxy/alfresco${version.downloadURL}" class="download">${msg("link.download")}</a></span>
</#if>
11-16-2011 04:39 AM
11-16-2011 06:12 AM
/**
* Retrieve current user's site membership.
*
* @method getSiteMembership
* @param siteId {string} Site to get details for
* @return {object} Object literal of the form
* <pre>
* isMember: true|false,
* isManager: true|false
* role: "SiteManager"|"SiteCollaborator"|"SiteContributor"|"SiteConsumer"
* </pre>
*/
getSiteMembership: function getSiteMembership(siteId)
{
var obj =
{
isMember: false,
isManager: false,
role: ""
};
var json = remote.call("/api/sites/" + encodeURIComponent(siteId) + "/memberships/" + encodeURIComponent(user.name));
if (json.status == 200)
{
response = eval('(' + json + ')');
if (response)
{
obj =
{
isMember: true,
isManager: response.role == "SiteManager",
role: response.role
};
}
}
return obj;
}
11-16-2011 09:29 AM
11-16-2011 12:40 PM
11-17-2011 04:10 AM
11-18-2011 12:44 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.