summaryrefslogtreecommitdiff
path: root/app/controllers/account_controller.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-07-05 08:54:43 +0200
committerAzul <azul@riseup.net>2016-07-05 08:54:43 +0200
commit798c1240b59403b8d8de9559776718266b2ecba5 (patch)
tree74b53a8762710a76c4ca5d270b6ef9545dfca221 /app/controllers/account_controller.rb
parentfcc8207f84249612eba719b8aa77cd7c51e5ad5a (diff)
parent30da8e6ffa1eefafb9762645efb85e0beed236c6 (diff)
Merge remote-tracking branch 'pr/222' into merge-branch
Diffstat (limited to 'app/controllers/account_controller.rb')
-rw-r--r--app/controllers/account_controller.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
new file mode 100644
index 0000000..ee7cca4
--- /dev/null
+++ b/app/controllers/account_controller.rb
@@ -0,0 +1,17 @@
+class AccountController < ApplicationController
+
+ before_filter :require_registration_allowed
+ before_filter :redirect_if_logged_in
+
+ def new
+ @user = User.new
+ end
+
+ protected
+
+ def require_registration_allowed
+ unless APP_CONFIG[:allow_registration]
+ redirect_to home_path
+ end
+ end
+end