09-21-2009 02:59 PM
09-21-2009 06:02 PM
09-21-2009 06:25 PM
Your problem is that your script is in the "share" webapp. And that does not have access to the local alfresco Java Script objects such as people.
One way of solving this is to use a webscript that pulls data from the repo, where it can run your java script.
09-23-2009 04:08 AM
09-25-2009 08:47 AM
header.get.html.ftl in Share: user.isAdmin
Mike
// if (json.status == 200 || people.isAdmin(person) == true)
if (json.status == 200)
{
var obj = eval('(' + json + ')');
userIsMember = true;
userIsSiteManager = obj.role == "SiteManager";
// Stse the memberships into the request context, it is used
// downstream by other components - saves making same call many times
context.setValue("memberships", obj);
}
09-25-2009 09:17 AM
header.get.html.ftl in Share: user.isAdmin
Mike
The commented out line above is what I'm trying to make work. Any thoughts?
JR
09-25-2009 05:35 PM
Did you try user.isAdmin..?
Mike
08250000 TypeError: isAdmin is not a function, it is java.lang.Boolean. (file:/srv/tomcat6/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/title/collaboration-title.get.js#29)
09-25-2009 07:06 PM
09-26-2009 06:19 PM
The error describes the problem: you're trying user.isAdmin() instead of user.isAdmin
Mike
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.