projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
027728f
)
Require that tou_read checkbox is set
author
Simon Poole
<simon@poole.ch>
Wed, 30 Jan 2019 09:20:47 +0000
(10:20 +0100)
committer
Simon Poole
<simon@poole.ch>
Mon, 13 May 2019 14:54:29 +0000
(16:54 +0200)
app/controllers/users_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/users_controller.rb
b/app/controllers/users_controller.rb
index e382f153144b2beaa72592a9ef08155ea6b6fcf1..bbe60e39ca231349224c89a8156faeaec10f486a 100644
(file)
--- a/
app/controllers/users_controller.rb
+++ b/
app/controllers/users_controller.rb
@@
-36,7
+36,7
@@
class UsersController < ApplicationController
def save
@title = t "users.new.title"
- if params[:decline]
+ if params[:decline]
|| !params[:read_tou] || params[:read_tou] == 0
if current_user
current_user.terms_seen = true
@@
-47,8
+47,10
@@
class UsersController < ApplicationController
else
redirect_to :action => :account, :display_name => current_user.display_name
end
- els
e
+ els
if params[:decline]
redirect_to t("users.terms.declined")
+ else
+ redirect_to :action => :terms
end
elsif current_user
unless current_user.terms_agreed?