mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-14 21:28:51 +01:00
allow adding users and set new users has having cas as the auth type
This commit is contained in:
parent
1621a7bb7d
commit
b85b3fc081
3 changed files with 20 additions and 1 deletions
|
|
@ -74,6 +74,11 @@ class UsersController < ApplicationController
|
|||
|
||||
first_user_signing_up = User.no_users_yet?
|
||||
user.is_admin = true if first_user_signing_up
|
||||
|
||||
if Tracks::Config.auth_schemes.include?('cas')
|
||||
user.auth_type = "cas" #since CAS will be doing all the auth we may as well set it for everyone when CAS in enabled
|
||||
end
|
||||
|
||||
if user.save
|
||||
@user = User.authenticate(user.login, params['user']['password'])
|
||||
@user.create_preference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue