11-17-2009 04:43 PM
11-17-2009 05:18 PM
11-17-2009 05:33 PM
11-17-2009 06:44 PM
11-18-2009 12:56 PM
12-04-2009 04:30 PM
12-04-2009 05:22 PM
12-04-2009 06:02 PM
function joinAllPublicSites()
{
/* Get a list of all public sites
Join site if we're not already a member
Much of this code comes from the site-finder component
*/
var result = remote.call("/api/sites?");
if (result.status != status.STATUS_OK) {
return;
}
// Ok, result's ok and we have something to do
var publicSites = eval('(' + result + ')');
var i, publicSite, retval, conn;
var authority = {
"authorityType" : "USER",
"fullName" : user.userName,
"userName" : user.userName,
"firstName" : user.firstName,
"lastName" : user.lastName
};
var data = {"role":"SiteConsumer", "person": {"userName" : user.name}};
for (i = 0; i < publicSites.length; i++) {
publicSite = publicSites[i];
conn=remote.connect("alfresco");
retval=conn.put("/api/sites/" + publicSite.shortName +
"/memberships/" + user.name, data);
}
}
Error exucuting macro: membershipJSON
required parameter: authority is not specified'
var data = {"role":"SiteConsumer", "person": {"userName" : user.name}, "authority":authority };
But that didn't change anything.12-04-2009 07:24 PM
retval=conn.put("/api/sites/" + publicSite.shortName +
"/memberships/" + encodeURIComponent(user.name), jsonUtils.toJSONString(data), "application/json");
12-05-2009 11:51 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.