Roles.userIsInRole keeps returning the wrong value although the role is set. Any idea whats wrong??
(if i check the role in the client-side console it returns true…)
FlowRouter.route('/secret', {
name: "secret",
triggersEnter: [(context, redirect) => {
if (!Roles.userIsInRole(Meteor.userId(), 'sec_clear')) {
console.log(Roles.userIsInRole(Meteor.userId(), 'sec_clear')); //returns false although role is set...
redirect('/');
}
}],
action: function(params, queryParams) {
BlazeLayout.render('nLayout2', {
footer: "fx2",
main: "secret",
nav: "navigation",
});
}
});