Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
We have a condition that some group name can see one mashup and another group name can see another mashup. How to do it. We have to change the mashup and widgets dynamically on the basis of group name?
Hi,
I don't know if with an Authenticator can be done, but easily you can build a script that sets user Home Mashup depending on the group it belongs to.
Carles.
Hi,
Thanks Carles for the response. Do you have any example for setting it ? If you have then can you please share with me.
Thanks,
Aditya Kumar
Hi Aditya,
Should be something like this ( take it easy, I didn't tested it ):
var searchResult = Resources["SearchFunctions"].SearchPeople({
maxItems: 1000000 ,
searchExpression: undefined ,
modelTags: undefined,
query: undefined,
aspects: undefined,
excludedAspects: undefined,
maxSearchItems: undefined
});
if (searchResult.rows.length) {
var peopleNames = searchResult.rows[0].peopleResults;
var user,userGroups,group,groupHomeMashup;
for each(peopleRow in peopleNames.rows) {
user = Users[peopleRow.name];
userGroups = user.GetGroups();
for each(groupRow in userGroups.rows) {
group = Groups[groupRow.name];
if (group) {
groupHomeMashup = group.GetHomeMashup();
if (groupHomeMashup) {
user.SetHomeMashup({ name: groupHomeMashup });
break;
}
}
}
}
}