diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 98f45cb9..33176298 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -33,7 +33,7 @@ class UsersController < ApplicationController @page_title = "TRACKS::Sign up as the admin user" @heading = "Welcome to TRACKS. To get started, please create an admin account:" @user = get_new_user - elsif @user && @user.is_admin? + elsif (@user && @user.is_admin?) || SITE_CONFIG['open_signups'] @page_title = "TRACKS::Sign up a new user" @heading = "Sign up a new user:" @user = get_new_user @@ -60,7 +60,7 @@ class UsersController < ApplicationController end respond_to do |format| format.html do - unless User.no_users_yet? || (@user && @user.is_admin?) + unless User.no_users_yet? || (@user && @user.is_admin?) || SITE_CONFIG['open_signups'] @page_title = "No signups" @admin_email = User.find_admin.preference.admin_email render :action => "nosignup", :layout => "login" @@ -208,4 +208,4 @@ class UsersController < ApplicationController end -end \ No newline at end of file +end diff --git a/config/site.yml.tmpl b/config/site.yml.tmpl index 61745f6b..683a2d21 100644 --- a/config/site.yml.tmpl +++ b/config/site.yml.tmpl @@ -30,6 +30,8 @@ secure_cookies: false # URL. Mongrel, for example, has a --prefix option. # subdir: "/tracks" +# Set to true to allow anyone to sign up for a username. +open_signups: false # Only needed if ldap is included in authentication_schemes # ldap: