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,15 +33,15 @@ 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)
|
||||
];
|
||||
}
|
||||
},
|
||||
action: function() {
|
||||
action: function() {
|
||||
this.render("profile");
|
||||
}
|
||||
});
|
||||
@ -50,17 +50,17 @@ 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');
|
||||
}
|
||||
},
|
||||
action: function() {
|
||||
action: function() {
|
||||
this.render("admin");
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user