Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
567a25b6
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
567a25b6
编写于
6月 13, 2015
作者:
R
Robert Speicher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ensure `session_expire_delay` field exists before accessing it
Closes #1798
上级
89b56c81
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
12 deletion
+12
-12
app/models/application_setting.rb
app/models/application_setting.rb
+4
-4
config/initializers/session_store.rb
config/initializers/session_store.rb
+4
-4
db/schema.rb
db/schema.rb
+4
-4
未找到文件。
app/models/application_setting.rb
浏览文件 @
567a25b6
...
...
@@ -27,10 +27,10 @@ class ApplicationSetting < ActiveRecord::Base
serialize
:restricted_visibility_levels
serialize
:restricted_signup_domains
,
Array
attr_accessor
:restricted_signup_domains_raw
validates
:session_expire_delay
,
presence:
true
,
numericality:
{
only_integer:
true
,
greater_than_or_equal_to:
0
}
validates
:session_expire_delay
,
presence:
true
,
numericality:
{
only_integer:
true
,
greater_than_or_equal_to:
0
}
validates
:home_page_url
,
allow_blank:
true
,
...
...
config/initializers/session_store.rb
浏览文件 @
567a25b6
# Be sure to restart your server when you modify this file.
if
ActiveRecord
::
Base
.
connection
.
active?
&&
ActiveRecord
::
Base
.
connection
.
table_exists?
(
'application_settings'
)
Settings
.
gitlab
[
'session_expire_delay'
]
=
ApplicationSetting
.
current
.
session_expire_delay
end
require
'gitlab/current_settings'
include
Gitlab
::
CurrentSettings
Settings
.
gitlab
[
'session_expire_delay'
]
=
current_application_settings
.
session_expire_delay
Gitlab
::
Application
.
config
.
session_store
(
:redis_store
,
# Using the cookie_store would enable session replay attacks.
...
...
@@ -12,4 +12,4 @@ Gitlab::Application.config.session_store(
httponly:
true
,
expire_after:
Settings
.
gitlab
[
'session_expire_delay'
]
*
60
,
path:
(
Rails
.
application
.
config
.
relative_url_root
.
nil?
)
?
'/'
:
Rails
.
application
.
config
.
relative_url_root
)
\ No newline at end of file
)
db/schema.rb
浏览文件 @
567a25b6
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2015060
42029
21
)
do
ActiveRecord
::
Schema
.
define
(
version:
2015060
91411
21
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -29,13 +29,13 @@ ActiveRecord::Schema.define(version: 20150604202921) do
t
.
boolean
"twitter_sharing_enabled"
,
default:
true
t
.
text
"restricted_visibility_levels"
t
.
boolean
"version_check_enabled"
,
default:
true
t
.
integer
"max_attachment_size"
,
default:
10
,
null:
false
t
.
integer
"max_attachment_size"
,
default:
10
,
null:
false
t
.
integer
"default_project_visibility"
t
.
integer
"default_snippet_visibility"
t
.
text
"restricted_signup_domains"
t
.
boolean
"user_oauth_applications"
,
default:
true
t
.
string
"after_sign_out_path"
t
.
integer
"session_expire_delay"
,
default:
10080
,
null:
false
t
.
integer
"session_expire_delay"
,
default:
10080
,
null:
false
end
create_table
"broadcast_messages"
,
force:
true
do
|
t
|
...
...
@@ -496,12 +496,12 @@ ActiveRecord::Schema.define(version: 20150604202921) do
t
.
string
"bitbucket_access_token"
t
.
string
"bitbucket_access_token_secret"
t
.
string
"location"
t
.
string
"public_email"
,
default:
""
,
null:
false
t
.
string
"encrypted_otp_secret"
t
.
string
"encrypted_otp_secret_iv"
t
.
string
"encrypted_otp_secret_salt"
t
.
boolean
"otp_required_for_login"
t
.
text
"otp_backup_codes"
t
.
string
"public_email"
,
default:
""
,
null:
false
end
add_index
"users"
,
[
"admin"
],
name:
"index_users_on_admin"
,
using: :btree
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录