cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to change the mashup dynamically with the help of authenticator?

adityaku
1-Visitor

How to change the mashup dynamically with the help of authenticator?

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?

3 REPLIES 3

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;

                }

            }

        }

    }

}

Announcements


Top Tags