Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
0667d1aa
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,发现更多精彩内容 >>
提交
0667d1aa
编写于
2月 13, 2017
作者:
A
Annabel Dunstone Gray
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Drop theme ID from users table
上级
b0dff3c8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
32 addition
and
16 deletion
+32
-16
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+0
-1
app/controllers/profiles/preferences_controller.rb
app/controllers/profiles/preferences_controller.rb
+0
-1
app/models/user.rb
app/models/user.rb
+0
-1
config/gitlab.yml.example
config/gitlab.yml.example
+0
-8
db/migrate/20170213172852_remove_theme_id_from_users.rb
db/migrate/20170213172852_remove_theme_id_from_users.rb
+29
-0
db/schema.rb
db/schema.rb
+3
-4
spec/models/user_spec.rb
spec/models/user_spec.rb
+0
-1
未找到文件。
app/controllers/admin/users_controller.rb
浏览文件 @
0667d1aa
...
...
@@ -194,7 +194,6 @@ class Admin::UsersController < Admin::ApplicationController
:provider
,
:remember_me
,
:skype
,
:theme_id
,
:twitter
,
:username
,
:website_url
...
...
app/controllers/profiles/preferences_controller.rb
浏览文件 @
0667d1aa
...
...
@@ -34,7 +34,6 @@ class Profiles::PreferencesController < Profiles::ApplicationController
:layout
,
:dashboard
,
:project_view
,
:theme_id
)
end
end
app/models/user.rb
浏览文件 @
0667d1aa
...
...
@@ -21,7 +21,6 @@ class User < ActiveRecord::Base
default_value_for
:can_create_team
,
false
default_value_for
:hide_no_ssh_key
,
false
default_value_for
:hide_no_password
,
false
default_value_for
:theme_id
,
gitlab_config
.
default_theme
attr_encrypted
:otp_secret
,
key:
Gitlab
::
Application
.
secrets
.
otp_key_base
,
...
...
config/gitlab.yml.example
浏览文件 @
0667d1aa
...
...
@@ -76,14 +76,6 @@ production: &base
# default_can_create_group: false # default: true
# username_changing_enabled: false # default: true - User can change her username/namespace
## Default theme ID
## 1 - Graphite
## 2 - Charcoal
## 3 - Green
## 4 - Gray
## 5 - Violet
## 6 - Blue
# default_theme: 2 # default: 2
## Automatic issue closing
# If a commit message matches this regular expression, all issues referenced from the matched text will be closed.
...
...
db/migrate/20170213172852_remove_theme_id_from_users.rb
0 → 100644
浏览文件 @
0667d1aa
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
RemoveThemeIdFromUsers
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
# When a migration requires downtime you **must** uncomment the following
# constant and define a short and easy to understand explanation as to why the
# migration requires downtime.
# DOWNTIME_REASON = ''
# When using the methods "add_concurrent_index" or "add_column_with_default"
# you must disable the use of transactions as these methods can not run in an
# existing transaction. When using "add_concurrent_index" make sure that this
# method is the _only_ method called in the migration, any other changes
# should go in a separate migration. This ensures that upon failure _only_ the
# index creation fails and can be retried or reverted easily.
#
# To disable transactions uncomment the following line and remove these
# comments:
# disable_ddl_transaction!
def
change
remove_column
:users
,
:theme_id
,
:integer
end
end
db/schema.rb
浏览文件 @
0667d1aa
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2017021
411111
2
)
do
ActiveRecord
::
Schema
.
define
(
version:
2017021
317285
2
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -109,8 +109,8 @@ ActiveRecord::Schema.define(version: 20170214111112) do
t
.
boolean
"html_emails_enabled"
,
default:
true
t
.
string
"plantuml_url"
t
.
boolean
"plantuml_enabled"
t
.
integer
"max_pages_size"
,
default:
100
,
null:
false
t
.
integer
"terminal_max_session_time"
,
default:
0
,
null:
false
t
.
integer
"max_pages_size"
,
default:
100
,
null:
false
end
create_table
"audit_events"
,
force: :cascade
do
|
t
|
...
...
@@ -1238,7 +1238,6 @@ ActiveRecord::Schema.define(version: 20170214111112) do
t
.
string
"linkedin"
,
default:
""
,
null:
false
t
.
string
"twitter"
,
default:
""
,
null:
false
t
.
string
"authentication_token"
t
.
integer
"theme_id"
,
default:
1
,
null:
false
t
.
string
"bio"
t
.
integer
"failed_attempts"
,
default:
0
t
.
datetime
"locked_at"
...
...
@@ -1351,4 +1350,4 @@ ActiveRecord::Schema.define(version: 20170214111112) do
add_foreign_key
"timelogs"
,
"merge_requests"
,
name:
"fk_timelogs_merge_requests_merge_request_id"
,
on_delete: :cascade
add_foreign_key
"trending_projects"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"u2f_registrations"
,
"users"
end
\ No newline at end of file
end
spec/models/user_spec.rb
浏览文件 @
0667d1aa
...
...
@@ -582,7 +582,6 @@ describe User, models: true do
it
"applies defaults to user"
do
expect
(
user
.
projects_limit
).
to
eq
(
Gitlab
.
config
.
gitlab
.
default_projects_limit
)
expect
(
user
.
can_create_group
).
to
eq
(
Gitlab
.
config
.
gitlab
.
default_can_create_group
)
expect
(
user
.
theme_id
).
to
eq
(
Gitlab
.
config
.
gitlab
.
default_theme
)
expect
(
user
.
external
).
to
be_falsey
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录