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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
84a414fe
Commit
84a414fe
authored
Jun 05, 2015
by
Eric Maziade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add session expiration delay configuration through UI application
settings
parent
971e57cf
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
21 additions
and
4 deletions
+21
-4
CHANGELOG
CHANGELOG
+2
-1
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+1
-0
app/models/application_setting.rb
app/models/application_setting.rb
+2
-0
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+4
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
config/initializers/session_store.rb
config/initializers/session_store.rb
+1
-1
db/migrate/20150604202921_add_session_expire_seconds_for_application_settings.rb
...21_add_session_expire_seconds_for_application_settings.rb
+5
-0
db/schema.rb
db/schema.rb
+2
-1
lib/gitlab/current_settings.rb
lib/gitlab/current_settings.rb
+2
-1
spec/models/application_setting_spec.rb
spec/models/application_setting_spec.rb
+1
-0
No files found.
CHANGELOG
View file @
84a414fe
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 7.12.0 (unreleased)
v 7.12.0 (unreleased)
- Add session expiration delay configuration through UI application settings
- Don't notify users mentioned in code blocks or blockquotes.
- Don't notify users mentioned in code blocks or blockquotes.
- Disable changing of the source branch in merge request update API (Stan Hu)
- Disable changing of the source branch in merge request update API (Stan Hu)
- Shorten merge request WIP text.
- Shorten merge request WIP text.
...
...
app/controllers/admin/application_settings_controller.rb
View file @
84a414fe
...
@@ -40,6 +40,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
...
@@ -40,6 +40,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:home_page_url
,
:home_page_url
,
:after_sign_out_path
,
:after_sign_out_path
,
:max_attachment_size
,
:max_attachment_size
,
:session_expire_seconds
,
:default_project_visibility
,
:default_project_visibility
,
:default_snippet_visibility
,
:default_snippet_visibility
,
:restricted_signup_domains_raw
,
:restricted_signup_domains_raw
,
...
...
app/models/application_setting.rb
View file @
84a414fe
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
# twitter_sharing_enabled :boolean default(TRUE)
# twitter_sharing_enabled :boolean default(TRUE)
# restricted_visibility_levels :text
# restricted_visibility_levels :text
# max_attachment_size :integer default(10), not null
# max_attachment_size :integer default(10), not null
# session_expire_seconds :integer default(604800), not null
# default_project_visibility :integer
# default_project_visibility :integer
# default_snippet_visibility :integer
# default_snippet_visibility :integer
# restricted_signup_domains :text
# restricted_signup_domains :text
...
@@ -61,6 +62,7 @@ class ApplicationSetting < ActiveRecord::Base
...
@@ -61,6 +62,7 @@ class ApplicationSetting < ActiveRecord::Base
sign_in_text:
Settings
.
extra
[
'sign_in_text'
],
sign_in_text:
Settings
.
extra
[
'sign_in_text'
],
restricted_visibility_levels:
Settings
.
gitlab
[
'restricted_visibility_levels'
],
restricted_visibility_levels:
Settings
.
gitlab
[
'restricted_visibility_levels'
],
max_attachment_size:
Settings
.
gitlab
[
'max_attachment_size'
],
max_attachment_size:
Settings
.
gitlab
[
'max_attachment_size'
],
session_expire_seconds:
Settings
.
gitlab
[
'session_expire_seconds'
],
default_project_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_project_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_snippet_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_snippet_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
restricted_signup_domains:
Settings
.
gitlab
[
'restricted_signup_domains'
]
restricted_signup_domains:
Settings
.
gitlab
[
'restricted_signup_domains'
]
...
...
app/views/admin/application_settings/_form.html.haml
View file @
84a414fe
...
@@ -83,6 +83,10 @@
...
@@ -83,6 +83,10 @@
=
f
.
label
:max_attachment_size
,
'Maximum attachment size (MB)'
,
class:
'control-label col-sm-2'
=
f
.
label
:max_attachment_size
,
'Maximum attachment size (MB)'
,
class:
'control-label col-sm-2'
.col-sm-10
.col-sm-10
=
f
.
number_field
:max_attachment_size
,
class:
'form-control'
=
f
.
number_field
:max_attachment_size
,
class:
'form-control'
.form-group
=
f
.
label
:session_expire_seconds
,
'Session duration (seconds)'
,
class:
'control-label col-sm-2'
.col-sm-10
=
f
.
number_field
:session_expire_seconds
,
class:
'form-control'
.form-group
.form-group
=
f
.
label
:restricted_signup_domains
,
'Restricted domains for sign-ups'
,
class:
'control-label col-sm-2'
=
f
.
label
:restricted_signup_domains
,
'Restricted domains for sign-ups'
,
class:
'control-label col-sm-2'
.col-sm-10
.col-sm-10
...
...
config/initializers/1_settings.rb
View file @
84a414fe
...
@@ -128,6 +128,7 @@ Settings.gitlab['issue_closing_pattern'] = '((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e
...
@@ -128,6 +128,7 @@ Settings.gitlab['issue_closing_pattern'] = '((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e
Settings
.
gitlab
[
'default_projects_features'
]
||=
{}
Settings
.
gitlab
[
'default_projects_features'
]
||=
{}
Settings
.
gitlab
[
'webhook_timeout'
]
||=
10
Settings
.
gitlab
[
'webhook_timeout'
]
||=
10
Settings
.
gitlab
[
'max_attachment_size'
]
||=
10
Settings
.
gitlab
[
'max_attachment_size'
]
||=
10
Settings
.
gitlab
[
'session_expire_seconds'
]
||=
604800
Settings
.
gitlab
.
default_projects_features
[
'issues'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'issues'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'issues'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'issues'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'merge_requests'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'merge_requests'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'merge_requests'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'merge_requests'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'wiki'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'wiki'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'wiki'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'wiki'
].
nil?
...
...
config/initializers/session_store.rb
View file @
84a414fe
...
@@ -6,6 +6,6 @@ Gitlab::Application.config.session_store(
...
@@ -6,6 +6,6 @@ Gitlab::Application.config.session_store(
key:
'_gitlab_session'
,
key:
'_gitlab_session'
,
secure:
Gitlab
.
config
.
gitlab
.
https
,
secure:
Gitlab
.
config
.
gitlab
.
https
,
httponly:
true
,
httponly:
true
,
expire_after:
1
.
week
,
expire_after:
ActiveRecord
::
Base
.
connected?
&&
ActiveRecord
::
Base
.
connection
.
table_exists?
(
'application_settings'
)
?
ApplicationSetting
.
current
.
session_expire_seconds
:
Settings
.
gitlab
[
'session_expire_seconds'
]
,
path:
(
Rails
.
application
.
config
.
relative_url_root
.
nil?
)
?
'/'
:
Rails
.
application
.
config
.
relative_url_root
path:
(
Rails
.
application
.
config
.
relative_url_root
.
nil?
)
?
'/'
:
Rails
.
application
.
config
.
relative_url_root
)
)
db/migrate/20150604202921_add_session_expire_seconds_for_application_settings.rb
0 → 100644
View file @
84a414fe
class
AddSessionExpireSecondsForApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:session_expire_seconds
,
:integer
,
default:
604800
,
null:
false
end
end
\ No newline at end of file
db/schema.rb
View file @
84a414fe
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20150
529150354
)
do
ActiveRecord
::
Schema
.
define
(
version:
20150
604202921
)
do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
enable_extension
"plpgsql"
...
@@ -35,6 +35,7 @@ ActiveRecord::Schema.define(version: 20150529150354) do
...
@@ -35,6 +35,7 @@ ActiveRecord::Schema.define(version: 20150529150354) do
t
.
text
"restricted_signup_domains"
t
.
text
"restricted_signup_domains"
t
.
boolean
"user_oauth_applications"
,
default:
true
t
.
boolean
"user_oauth_applications"
,
default:
true
t
.
string
"after_sign_out_path"
t
.
string
"after_sign_out_path"
t
.
integer
"session_expire_seconds"
,
default:
604800
,
null:
false
end
end
create_table
"broadcast_messages"
,
force:
true
do
|
t
|
create_table
"broadcast_messages"
,
force:
true
do
|
t
|
...
...
lib/gitlab/current_settings.rb
View file @
84a414fe
...
@@ -21,7 +21,8 @@ module Gitlab
...
@@ -21,7 +21,8 @@ module Gitlab
gravatar_enabled:
Settings
.
gravatar
[
'enabled'
],
gravatar_enabled:
Settings
.
gravatar
[
'enabled'
],
sign_in_text:
Settings
.
extra
[
'sign_in_text'
],
sign_in_text:
Settings
.
extra
[
'sign_in_text'
],
restricted_visibility_levels:
Settings
.
gitlab
[
'restricted_visibility_levels'
],
restricted_visibility_levels:
Settings
.
gitlab
[
'restricted_visibility_levels'
],
max_attachment_size:
Settings
.
gitlab
[
'max_attachment_size'
]
max_attachment_size:
Settings
.
gitlab
[
'max_attachment_size'
],
session_expire_seconds:
Settings
.
gitlab
[
'session_expire_seconds'
]
)
)
end
end
end
end
...
...
spec/models/application_setting_spec.rb
View file @
84a414fe
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
# twitter_sharing_enabled :boolean default(TRUE)
# twitter_sharing_enabled :boolean default(TRUE)
# restricted_visibility_levels :text
# restricted_visibility_levels :text
# max_attachment_size :integer default(10), not null
# max_attachment_size :integer default(10), not null
# session_expire_seconds :integer default(604800), not null
# default_project_visibility :integer
# default_project_visibility :integer
# default_snippet_visibility :integer
# default_snippet_visibility :integer
# restricted_signup_domains :text
# restricted_signup_domains :text
...
...
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