mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
using db flag to check if is admin
This commit is contained in:
parent
c5c78e8336
commit
eca060b97f
1 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
|||
isAdmin=function(userOrId){
|
||||
var user= typeof userOrId === 'string' ? Meteor.users.findOne(userOrId) : userOrId;
|
||||
var email=user.emails[0].email;
|
||||
var adminEmails=["sacha357@gmail.com", "your_email_here@gmail.com"];
|
||||
return adminEmails.indexOf(email) != -1
|
||||
console.log(user);
|
||||
return user.isAdmin;
|
||||
}
|
Loading…
Add table
Reference in a new issue