09-12-2009 02:37 AM
04-01-2010 08:41 AM
07-14-2010 06:29 PM
If you simply want to prevent the Create Site-link from being shown you could disable it in the file my-sites.get.html.ftl.
to remove it from the Getting started dashlet edit user-welcome.get.html.ftl , something like :
<#if user.isAdmin>
<div class="detail-list-item">
<h4 class="theme-color-2">${msg("header.customiseDashboard")}</h4>
<div>${msg("text.customiseDashboard")}</div>
<div><a href="${url.context}/page/customise-user-dashboard" class="theme-color-2">${msg("link.customiseDashboard")}</a></div>
</div>
<div class="detail-list-item last-item">
<h4 class="theme-color-2">${msg("header.createSite")}</h4>
<div>${msg("text.createSite")}</div>
<div><a id="${args.htmlid}-createSite-button" href="#" class="theme-color-2">${msg("link.createSite")}</a></div>
</div>
<#else>
<div class="detail-list-item last-item">
<h4 class="theme-color-2">${msg("header.customiseDashboard")}</h4>
<div>${msg("text.customiseDashboard")}</div>
<div><a href="${url.context}/page/customise-user-dashboard" class="theme-color-2">${msg("link.customiseDashboard")}</a></div>
</div>
07-27-2010 07:58 PM
07-27-2010 10:07 PM
07-28-2010 04:11 AM
07-28-2010 04:38 AM
07-28-2010 04:42 PM
07-28-2010 04:47 PM
Use the extensions mechanism*, that's what it's there for.
* shared/classes/alfresco/extension for the alfresco.war
shared/classes/alfresco/web-extension for the share.war
Thanks,
Mike
10-13-2010 05:30 AM
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;
var mygroups = "";
for (i=0; i<groups.length; i++)
{
if (groups[i].displayName == group || groups[i].displayName == "ALFRESCO_ADMINISTRATORS"){
return true; // found group
}else{
mygroup = mygroups+groups[i].displayName;
}
}
return false;
}
else return false;
}
and by adding at the end of the file this:
var createSiteVisible = userHasGroup(user.name, 'YOUR_GROUP_NAME');
model.createSiteVisible = createSiteVisible;
YOUR_GROUP_NAME is the name of the GROUP you created to control site creation feature.
<#if !user.isGuest>
<ul class="create-site-menuitem">
<li>
<a href="#" onclick="thisHeader.showCreateSite(); return false;">${msg("header.sites.createSite")}</a>
</li>
</ul>
</#if>
with:
<#if createSiteVisible>
<ul class="create-site-menuitem">
<li>
<a href="#" onclick="thisHeader.showCreateSite(); return false;">${msg("header.sites.createSite")}</a>
</li>
</ul>
</#if>
02-01-2016 01:55 AM
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.