manually applied patch from Chris Erway to enable open signups for people hosting Tracks

This commit is contained in:
Reinier Balt 2009-03-31 22:32:29 +02:00
parent 7f4929808c
commit f4f2573f98
2 changed files with 5 additions and 3 deletions

View file

@ -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
end