summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/users.js')
-rw-r--r--models/users.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/models/users.js b/models/users.js
index 7b484f92..236feb45 100644
--- a/models/users.js
+++ b/models/users.js
@@ -104,6 +104,10 @@ Users.attachSchema(new SimpleSchema({
type: Date,
optional: true,
},
+ isAdmin: {
+ type: Boolean,
+ optional: true
+ }
}));
// Search a user in the complete server database by its name or username. This
@@ -405,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;
}