mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-30 13:58:49 +01:00
manually applied patch from Chris Erway to enable open signups for people hosting Tracks
This commit is contained in:
parent
7f4929808c
commit
f4f2573f98
2 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue