mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
#217: now isAdmin router check call this.subscribe().wait() to avoid showing 'You have to be an admin' message to admins
This commit is contained in:
parent
492bf22d30
commit
088c2a1127
1 changed files with 2 additions and 0 deletions
|
@ -131,6 +131,8 @@ var filters = {
|
|||
},
|
||||
|
||||
isAdmin: function() {
|
||||
this.subscribe('currentUser').wait();
|
||||
if(!this.ready()) return;
|
||||
if(!Meteor.loggingIn() && Session.get('settingsLoaded') && !isAdmin()){
|
||||
throwError(i18n.t("Sorry, you have to be an admin to view this page."))
|
||||
this.render('no_rights');
|
||||
|
|
Loading…
Add table
Reference in a new issue