AnsweredAssumed Answered

How to access repo service in Share WebScript

Question asked by mehar460 on Oct 5, 2018
Latest reply on Oct 10, 2018 by mehar460

When I am using people object in Share Webscript received below error.

 

ReferenceError: people is not defined alfresco

 

My requirement is to display few navigation links if user is part of a group. Below is the code snippet.

 

var node = people.getGroup("<some_group>");

if(node)
{
var members = people.getMembers(node, true);
for(i=0; i< members.length; i++)
{
if(name.toUpperCase() == members[i].properties.userName.toUpperCase())
{
var headerMenu = widgetUtils.findObject(model.jsonModel, "id", "HEADER_APP_MENU_BAR");
if (headerMenu != null) {
headerMenu.config.widgets.push({
id: "HEADER_USER_TRASH_CAN",
name: "alfresco/menus/AlfMenuBarItem",
config: {
label: "My Trash Can",
targetUrl: "user/" + encodeURIComponent(user.name) + "/user-trashcan"
}
});
}
}
break;
}
}

Outcomes