Fixed admin page not waiting
This commit is contained in:
parent
09e6afd10b
commit
1d66a88ef1
@ -58,7 +58,7 @@ Router.route('/user/:email', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Router.route('/admin', {
|
/*Router.route('/admin', {
|
||||||
waitOn: function() {
|
waitOn: function() {
|
||||||
if (Roles.userIsInRole(Meteor.userId(), ['admin', 'superadmin'])) {
|
if (Roles.userIsInRole(Meteor.userId(), ['admin', 'superadmin'])) {
|
||||||
return [
|
return [
|
||||||
@ -75,6 +75,25 @@ Router.route('/admin', {
|
|||||||
action: function() {
|
action: function() {
|
||||||
this.render("admin");
|
this.render("admin");
|
||||||
}
|
}
|
||||||
|
});*/
|
||||||
|
|
||||||
|
Router.route('/admin', {
|
||||||
|
waitOn: function() {
|
||||||
|
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)
|
||||||
|
];
|
||||||
|
},
|
||||||
|
action: function() {
|
||||||
|
if (!Roles.userIsInRole(Meteor.userId(), ['admin', 'superadmin'])) {
|
||||||
|
this.render("NotFound");
|
||||||
|
} else {
|
||||||
|
this.render("admin");
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Router.configure({
|
Router.configure({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user