<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>
<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>
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.
Archive content from product discussions in Italian.
This group is now closed and content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.