Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
60225a06
Commit
60225a06
authored
May 29, 2015
by
Alex Lossent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to configure a URL to show after sign out
parent
a3b60982
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
2 deletions
+20
-2
CHANGELOG
CHANGELOG
+1
-0
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+1
-0
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+1
-1
app/models/application_setting.rb
app/models/application_setting.rb
+5
-0
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+5
-0
db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb
...50354_add_after_sign_out_path_for_application_settings.rb
+5
-0
db/schema.rb
db/schema.rb
+2
-1
No files found.
CHANGELOG
View file @
60225a06
...
...
@@ -34,6 +34,7 @@ v 7.12.0 (unreleased)
- You can not remove user if he/she is an only owner of group
- User should be able to leave group. If not - show him proper message
- User has ability to leave project
- Allow to configure a URL to show after sign out
v 7.11.4
- Fix missing bullets when creating lists
...
...
app/controllers/admin/application_settings_controller.rb
View file @
60225a06
...
...
@@ -38,6 +38,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:twitter_sharing_enabled
,
:sign_in_text
,
:home_page_url
,
:after_sign_out_path
,
:max_attachment_size
,
:default_project_visibility
,
:default_snippet_visibility
,
...
...
app/controllers/application_controller.rb
View file @
60225a06
...
...
@@ -89,7 +89,7 @@ class ApplicationController < ActionController::Base
end
def
after_sign_out_path_for
(
resource
)
new_user_session_path
current_application_settings
.
after_sign_out_path
||
new_user_session_path
end
def
abilities
...
...
app/models/application_setting.rb
View file @
60225a06
...
...
@@ -19,6 +19,7 @@
# default_snippet_visibility :integer
# restricted_signup_domains :text
# user_oauth_applications :bool default(TRUE)
# after_sign_out_path :string(255)
#
class
ApplicationSetting
<
ActiveRecord
::
Base
...
...
@@ -31,6 +32,10 @@ class ApplicationSetting < ActiveRecord::Base
format:
{
with:
/\A
#{
URI
.
regexp
(
%w(http https)
)
}
\z/
,
message:
"should be a valid url"
},
if: :home_page_url_column_exist
validates
:after_sign_out_path
,
allow_blank:
true
,
format:
{
with:
/\A
#{
URI
.
regexp
(
%w(http https)
)
}
\z/
,
message:
"should be a valid url"
}
validates_each
:restricted_visibility_levels
do
|
record
,
attr
,
value
|
unless
value
.
nil?
value
.
each
do
|
level
|
...
...
app/views/admin/application_settings/_form.html.haml
View file @
60225a06
...
...
@@ -69,6 +69,11 @@
.col-sm-10
=
f
.
text_field
:home_page_url
,
class:
'form-control'
,
placeholder:
'http://company.example.com'
,
:'aria-describedby'
=>
'home_help_block'
%span
.help-block
#home_help_block
We will redirect non-logged in users to this page
.form-group
=
f
.
label
:after_sign_out_path
,
class:
'control-label col-sm-2'
.col-sm-10
=
f
.
text_field
:after_sign_out_path
,
class:
'form-control'
,
placeholder:
'http://company.example.com'
,
:'aria-describedby'
=>
'after_sign_out_path_help_block'
%span
.help-block
#after_sign_out_path_help_block
We will redirect users to this page after they sign out
.form-group
=
f
.
label
:sign_in_text
,
class:
'control-label col-sm-2'
.col-sm-10
...
...
db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb
0 → 100644
View file @
60225a06
class
AddAfterSignOutPathForApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:after_sign_out_path
,
:string
end
end
\ No newline at end of file
db/schema.rb
View file @
60225a06
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201505291
11607
)
do
ActiveRecord
::
Schema
.
define
(
version:
201505291
50354
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -34,6 +34,7 @@ ActiveRecord::Schema.define(version: 20150529111607) do
t
.
integer
"default_snippet_visibility"
t
.
text
"restricted_signup_domains"
t
.
boolean
"user_oauth_applications"
,
default:
true
t
.
string
"after_sign_out_path"
end
create_table
"broadcast_messages"
,
force:
true
do
|
t
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment