Hello!!
I need to limit a live search of some users and even groups... i'm editing a file share-header.get.js....
I removed other menus for user non admin, but in the search i need to limit it for groups or user... betters works for groups...
I'm try it..
if (!user.isAdmin)
{
widgetUtils.deleteObjectFromArray(model.jsonModel.widgets, "id", "HEADER_MY_FILES");
widgetUtils.deleteObjectFromArray(model.jsonModel.widgets, "id", "HEADER_PEOPLE");
widgetUtils.deleteObjectFromArray(model.jsonModel.widgets, "id", "HEADER_TASKS");
widgetUtils.deleteObjectFromArray(model.jsonModel.widgets, "id", "HEADER_SHARED_FILES");
};
//Hide Peoples to Search bar
var hidePeoples = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
if (!group.isGROUP_SITE_CREATORS)
{
hidePeoples.config.showPeopleResults = false;
};
But the part "if (!group.isGROUP_SITE_CREATORS)" works bad... can anyone help me with this??
Solved! Go to Solution.
try
if(user.properties["alfUserGroups"].indexOf("**** group") != -1)
Thks sir!!! works fine!!!
If anyone want this...
I create GROUP_SITE_SEARCH and populate with peoples i'll not use a search...
var hidePeoples = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
if(user.properties["alfUserGroups"].indexOf("GROUP_SITE_SEARCH") != -1)
{
hidePeoples.config.showPeopleResults = false;
hidePeoples.config.showDocumentResults = false;
//widgetUtils.deleteObjectFromArray(model.jsonModel.widgets, "id", "HEADER_SEARCH");
};
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
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.