Customize Settings for Mashups
Apply Mashup to selected Users
It is possible to apply a mashup only to users with selected numeric IDs or to ones having specified Default Role. The code fragment below illustrates the basics.
🚧 Default Role may differ from Role in Project or Team
More information: Default Role
var applyTo = {
roleNames: ["Developer", "Project Manager"],
userIds: [14, 29, 58]
};
tau.mashups
.addMashup(function() {
var loggedUser = window.loggedUser || {};
var isApplied = _.contains(applyTo.roleNames, loggedUser.role) || _.contains(applyTo.userIds, loggedUser.id);
if (isApplied) {
//write your custom code here
console.log("Mashup applied to a logged user");
}
});