filter on router
This commit is contained in:
parent
a213cfde23
commit
3a9fd1ed0d
@ -4,11 +4,11 @@ Router.route('/', {
|
||||
this.redirect('/login');
|
||||
} else {
|
||||
return [
|
||||
Meteor.subscribe('classes',this.params._id),
|
||||
Meteor.subscribe('schools',this.params._id),
|
||||
Meteor.subscribe('work',this.params._id),
|
||||
Meteor.subscribe('requests',this.params._id),
|
||||
Meteor.subscribe('users',this.params._id)
|
||||
Meteor.subscribe('classes', this.params._id),
|
||||
Meteor.subscribe('schools', this.params._id),
|
||||
Meteor.subscribe('work', this.params._id),
|
||||
Meteor.subscribe('requests', this.params._id),
|
||||
Meteor.subscribe('users', this.params._id)
|
||||
];
|
||||
}
|
||||
},
|
||||
@ -33,11 +33,11 @@ Router.route('/profile', {
|
||||
this.redirect('/login');
|
||||
} else {
|
||||
return [
|
||||
Meteor.subscribe('classes',this.params._id),
|
||||
Meteor.subscribe('schools',this.params._id),
|
||||
Meteor.subscribe('work',this.params._id),
|
||||
Meteor.subscribe('requests',this.params._id),
|
||||
Meteor.subscribe('users',this.params._id)
|
||||
Meteor.subscribe('classes', this.params._id),
|
||||
Meteor.subscribe('schools', this.params._id),
|
||||
Meteor.subscribe('work', this.params._id),
|
||||
Meteor.subscribe('requests', this.params._id),
|
||||
Meteor.subscribe('users', this.params._id)
|
||||
];
|
||||
}
|
||||
},
|
||||
@ -50,11 +50,11 @@ Router.route('/admin', {
|
||||
waitOn: function() {
|
||||
if (Roles.userIsInRole(Meteor.userId(), ['admin', 'superadmin'])) {
|
||||
return [
|
||||
Meteor.subscribe('classes',this.params._id),
|
||||
Meteor.subscribe('schools',this.params._id),
|
||||
Meteor.subscribe('work',this.params._id),
|
||||
Meteor.subscribe('requests',this.params._id),
|
||||
Meteor.subscribe('users',this.params._id)
|
||||
Meteor.subscribe('classes', this.params._id),
|
||||
Meteor.subscribe('schools', this.params._id),
|
||||
Meteor.subscribe('work', this.params._id),
|
||||
Meteor.subscribe('requests', this.params._id),
|
||||
Meteor.subscribe('users', this.params._id)
|
||||
];
|
||||
} else {
|
||||
this.render('NotFound');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user