kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 194 forks source link

Meteor Role Auth? #540

Closed fallenpeace closed 8 years ago

fallenpeace commented 8 years ago

Is checking for auth & role auth, at the template level still recommended?

Eg, been looking at some examples on the mantra project, and some of them do auth in the action of flow router

action() {
 if(!Meteor.userId()) {
    FlowRouter.go('/login');
 }
}

Could this be used to check roles too? Or should we just opt for template level checks of auth?

arunoda commented 8 years ago

Use template/component level auth.

uiii commented 8 years ago

Hi, I've made related issue here: https://github.com/kadirahq/mantra/issues/153