diff options
author | azul <azul@leap.se> | 2014-07-11 13:00:27 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2014-07-11 13:00:27 +0200 |
commit | 1c7308207a9ab46cfb60c72aceaee2b3c82281fe (patch) | |
tree | 858f22fd9167b490b8b3fcaed2884215d0f0018a /app/controllers/v1 | |
parent | c9dd5a342f902b27aec73af24776025a03feda48 (diff) | |
parent | 140155f32a9bd8ef2d5a581a1e56701a44a8f5a7 (diff) |
Merge pull request #178 from fbernitt/issue_5217_allow_registration
Added allow_registration toggle.
Diffstat (limited to 'app/controllers/v1')
-rw-r--r-- | app/controllers/v1/users_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/v1/users_controller.rb b/app/controllers/v1/users_controller.rb index 006e6d8..881708a 100644 --- a/app/controllers/v1/users_controller.rb +++ b/app/controllers/v1/users_controller.rb @@ -19,8 +19,12 @@ module V1 end def create - @user = Account.create(params[:user]) - respond_with @user # return ID instead? + if APP_CONFIG[:allow_registration] + @user = Account.create(params[:user]) + respond_with @user # return ID instead? + else + head :forbidden + end end def update |