[Git][noosfero/noosfero][master] 2 commits: Merge branch 'activate-redirection' into 'master-1.x'
Rodrigo Souto
gitlab at mg.gitlab.com
Mon Aug 6 16:59:58 BRT 2018
Rodrigo Souto pushed to branch master at Noosfero / noosfero
Commits:
89f8a55b by Rodrigo Souto at 2018-08-02T17:52:01Z
Merge branch 'activate-redirection' into 'master-1.x'
Redirects to login when activation params are invalid
See merge request noosfero/noosfero!1541
(cherry picked from commit 72ac7e550b15f526ff55e222b454b631f20790df)
cdb6ecf7 Redirects to login when activating without token
- - - - -
7bb31d26 by Rodrigo Souto at 2018-08-06T19:59:55Z
Merge branch 'cherry-pick-72ac7e55' into 'master'
Merge branch 'activate-redirection' into 'master-1.x'
See merge request noosfero/noosfero!1592
- - - - -
2 changed files:
- app/controllers/public/account_controller.rb
- test/functional/account_controller_test.rb
Changes:
=====================================
app/controllers/public/account_controller.rb
=====================================
@@ -500,6 +500,6 @@ class AccountController < ApplicationController
end
def check_activation_token
- render_not_found unless params[:activation_token]
+ redirect_to action: :login unless params[:activation_token].present?
end
end
=====================================
test/functional/account_controller_test.rb
=====================================
@@ -716,9 +716,9 @@ class AccountControllerTest < ActionController::TestCase
assert_redirected_to action: :login
end
- should 'respond with 404 when activation token is not sent' do
+ should 'redirect to login when activation token is not sent' do
get :activate, activation_token: nil
- assert_response 404
+ assert_redirected_to action: :login
end
should 'activate user when activation code is present and correct' do
@@ -1077,7 +1077,7 @@ class AccountControllerTest < ActionController::TestCase
should 'render 404 if activation token is not sent when requesting new codes' do
get :resend_activation_codes
- assert_response 404
+ assert_redirected_to action: :login
end
should 'redirect to login if user was activated when requesting new codes' do
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/32b13b3507ab8a76d7fe0a52eca2c525235a1b4f...7bb31d26fe687bd977ea995cc11f18a7b326aac0
--
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/32b13b3507ab8a76d7fe0a52eca2c525235a1b4f...7bb31d26fe687bd977ea995cc11f18a7b326aac0
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180806/04073147/attachment-0001.html>
More information about the Noosfero-dev
mailing list