From 37e3cd65daf65de6a969c648a7c3c96c3a15cdd1 Mon Sep 17 00:00:00 2001 From: IngridMorstrad Date: Sun, 16 Mar 2014 21:56:29 +0530 Subject: [PATCH] User now set to admin at signup instead of login --- server/users/User.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/users/User.coffee b/server/users/User.coffee index 29d0d0a1f..7b9669ee2 100644 --- a/server/users/User.coffee +++ b/server/users/User.coffee @@ -16,13 +16,13 @@ UserSchema.pre('init', (next) -> return next() unless jsonschema.properties? for prop, sch of jsonschema.properties @set(prop, sch.default) if sch.default? + @set('permissions', ['admin']) if not isProduction next() ) UserSchema.post('init', -> @set('anonymous', false) if @get('email') @currentSubscriptions = JSON.stringify(@get('emailSubscriptions')) - @set('permissions', ['admin']) if not isProduction ) UserSchema.methods.isAdmin = ->