First user is admin only if not running in sandstorm

This commit is contained in:
Julen Landa Alustiza 2017-04-02 16:29:51 +02:00
parent 1218e114be
commit 28a1dd677c

View file

@ -409,7 +409,7 @@ if (Meteor.isServer) {
});
Accounts.onCreateUser((options, user) => {
const userCount = Users.find().count();
if (userCount === 0){
if (!isSandstorm && userCount === 0 ){
user.isAdmin = true;
return user;
}