10-09-2012 05:46 AM
10-09-2012 10:38 AM
<app-items>
<!– defaults: icon="{id}.png" label="header.{id}.label" description="header.{id}.description" –>
<item type="link" id="my-dashboard" condition="userIsSiteManager">{userdashboardpage}</item>
<item type="js" id="sites" condition="userIsSiteManager">Alfresco.module.Sites</item>
<item type="link" id="people" condition="userIsSiteManager">/people-finder</item>
<item type="link" id="repository" condition="conditionRepositoryRootNode">/repository</item>
<item type="container" id="more" condition="userIsSiteManager">
…
/**
* User Status
*/
function getUserStatus()
{
var userStatus = msg.get("status.default"),
userStatusTime = "";
if (user.properties["userStatus"] != null)
{
userStatus = user.properties["userStatus"];
}
if (user.properties["userStatusTime"] != null)
{
userStatusTime = user.properties["userStatusTime"];
}
model.userStatus = userStatus;
model.userStatusTime = userStatusTime;
/////////
// Aggiunto per nascondere o meno i pulsanti dell'header
// Call the repository to see if the user is site manager or not
model.userIsSiteManager = false,
json = remote.call("/api/sites/" + page.url.templateArgs.site + "/memberships/" + encodeURIComponent(user.name));
if (json.status == 200)
{
var obj = eval('(' + json + ')');
if (obj)
{
model.userIsSiteManager = obj.role == "SiteManager";
}
}
//////////////
}
<#assign conditionRepositoryRootNode = (((config.scoped["RepositoryLibrary"]["root-node"].getValue())!"") != "") && userIsSiteManager>
10-10-2012 04:07 AM
<alfresco-config>
<!– Repository Library config section –>
<config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
<!–
Whether the link to the Repository Library appears in the header component or not.
–>
<visible>true</visible>
</config>
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>http</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
<endpoint>
<id>activiti-admin</id>
<name>Activiti Admin UI - user access</name>
<description>Access to Activiti Admin UI, that requires user authentication</description>
<connector-id>activiti-admin-connector</connector-id>
<endpoint-url>http://localhost:8080/alfresco/activiti-admin</endpoint-url>
<identity>user</identity>
</endpoint>
</remote>
</config>
</alfresco-config>
10-11-2012 03:39 AM
10-11-2012 12:25 PM
10-12-2012 03:13 AM
Ciao,
copia la parte che ti manca da share-config.xml dovrebbe essere indicata come "global config section".
Non dimenticare il replace="true" nel tag config, così fai l'override di quella configurazione.
12-05-2012 05:53 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.