[Git][noosfero/noosfero][master] 2 commits: account: add new option to redirect to domain root
Gabriel Silva
gitlab at mg.gitlab.com
Wed Jun 27 10:14:17 BRT 2018
Gabriel Silva pushed to branch master at Noosfero / noosfero
Commits:
c1c375c2 by Rodrigo Souto at 2018-06-25T21:55:52Z
account: add new option to redirect to domain root
- - - - -
b3173745 by Gabriel Silva at 2018-06-27T13:14:13Z
Merge branch 'domain-root-redirection' into 'master'
account: add new option to redirect to domain root
See merge request noosfero/noosfero!1555
- - - - -
2 changed files:
- app/controllers/public/account_controller.rb
- app/models/environment.rb
Changes:
=====================================
app/controllers/public/account_controller.rb
=====================================
--- a/app/controllers/public/account_controller.rb
+++ b/app/controllers/public/account_controller.rb
@@ -504,6 +504,8 @@ class AccountController < ApplicationController
redirect_back_or_default(user.admin_url)
when 'site_homepage'
redirect_to :controller => :home
+ when 'domain_root'
+ redirect_to '/'
when 'user_profile_page'
redirect_to user.public_profile_url
when 'user_homepage'
=====================================
app/models/environment.rb
=====================================
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -180,6 +180,7 @@ class Environment < ApplicationRecord
{
'keep_on_same_page' => _('Stays on the same page the user was before login.'),
'site_homepage' => _('Redirects the user to the environment homepage.'),
+ 'domain_root' => _('Redirects the user to the current domain root.'),
'user_profile_page' => _('Redirects the user to his profile page.'),
'user_homepage' => _('Redirects the user to his homepage.'),
'user_control_panel' => _('Redirects the user to his control panel.'),
@@ -192,6 +193,7 @@ class Environment < ApplicationRecord
{
'keep_on_same_page' => _('Stays on the same page the user was before signup.'),
'site_homepage' => _('Redirects the user to the environment homepage.'),
+ 'domain_root' => _('Redirects the user to the current domain root.'),
'user_profile_page' => _('Redirects the user to his profile page.'),
'user_homepage' => _('Redirects the user to his homepage.'),
'user_control_panel' => _('Redirects the user to his control panel.'),
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/e6a0b2cf452094f827112f13740652fe802aa67b...b31737450c8cc36aa89554a2c7748846beb37975
--
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/e6a0b2cf452094f827112f13740652fe802aa67b...b31737450c8cc36aa89554a2c7748846beb37975
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/20180627/80c70575/attachment-0001.html>
More information about the Noosfero-dev
mailing list