03-13-2015 09:23 AM
03-13-2015 12:30 PM
03-13-2015 12:46 PM
<#if createSiteVisible>
<ul class="create-site-menuitem">
<li>
<a href="#" onclick='Alfresco.util.ComponentManager.get("${id_js}").showCreateSite(); return false;'>${msg("label.create-site")}</a>
</li>
</ul>
</#if>
03-16-2015 04:55 AM
02-02-2017 01:21 AM
Hi i couldn't find the code you mentioned in the provided path, i'm unable to identify the source... i'm sending you a screenshot.. could you help me please??
03-16-2015 01:52 AM
03-16-2015 04:56 AM
03-16-2015 10:32 AM
you can try to add this code in my-sites.get.js:
var createSiteVisible = userHasGroup(user.name, 'SiteCreators');
model.createSiteVisible = createSiteVisible;
function userHasGroup(username, group) {
var result = remote.call("/api/people/" + stringUtils.urlEncode(username) + "?groups=true");
if (result.status == 200 && result != "{}") {
var user = eval('(' + result + ')');
var groups = new Array();
groups = user.groups;
for (i = 0; i < groups.length; i++) {
if (groups[i].itemName == "GROUP_" + group || groups[i].itemName == "GROUP_ALFRESCO_ADMINISTRATORS") {
return true; // found group
}
}
return false;
} else {
return false;
}
}
Edit: the code had some errors, and there were parts not relevant to the topic, so I fixed it and removed those parts.
03-23-2015 04:49 AM
03-17-2015 07:56 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.