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
Léo-Paul Géneau
gitlab-ce
Commits
c780ad0e
Commit
c780ad0e
authored
Feb 13, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove all instances of theme_id; require downtime
parent
0667d1aa
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
18 additions
and
31 deletions
+18
-31
config/gitlab.yml.example
config/gitlab.yml.example
+1
-1
db/migrate/20170213172852_remove_theme_id_from_users.rb
db/migrate/20170213172852_remove_theme_id_from_users.rb
+1
-1
db/schema.rb
db/schema.rb
+1
-1
doc/api/keys.md
doc/api/keys.md
+0
-1
doc/api/session.md
doc/api/session.md
+0
-1
doc/api/users.md
doc/api/users.md
+0
-5
lib/api/entities.rb
lib/api/entities.rb
+1
-1
spec/controllers/profiles/preferences_controller_spec.rb
spec/controllers/profiles/preferences_controller_spec.rb
+2
-4
spec/fixtures/api/schemas/user/login.json
spec/fixtures/api/schemas/user/login.json
+0
-1
spec/fixtures/api/schemas/user/public.json
spec/fixtures/api/schemas/user/public.json
+7
-9
spec/models/user_spec.rb
spec/models/user_spec.rb
+1
-2
spec/support/gitlab_stubs/session.json
spec/support/gitlab_stubs/session.json
+2
-2
spec/support/gitlab_stubs/user.json
spec/support/gitlab_stubs/user.json
+2
-2
No files found.
config/gitlab.yml.example
View file @
c780ad0e
db/migrate/20170213172852_remove_theme_id_from_users.rb
View file @
c780ad0e
...
...
@@ -5,7 +5,7 @@ class RemoveThemeIdFromUsers < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
fals
e
DOWNTIME
=
tru
e
# When a migration requires downtime you **must** uncomment the following
# constant and define a short and easy to understand explanation as to why the
...
...
db/schema.rb
View file @
c780ad0e
...
...
@@ -109,8 +109,8 @@ ActiveRecord::Schema.define(version: 20170213172852) do
t
.
boolean
"html_emails_enabled"
,
default:
true
t
.
string
"plantuml_url"
t
.
boolean
"plantuml_enabled"
t
.
integer
"terminal_max_session_time"
,
default:
0
,
null:
false
t
.
integer
"max_pages_size"
,
default:
100
,
null:
false
t
.
integer
"terminal_max_session_time"
,
default:
0
,
null:
false
end
create_table
"audit_events"
,
force: :cascade
do
|
t
|
...
...
doc/api/keys.md
View file @
c780ad0e
...
...
@@ -33,7 +33,6 @@ Parameters:
"twitter"
:
""
,
"website_url"
:
""
,
"email"
:
"john@example.com"
,
"theme_id"
:
2
,
"color_scheme_id"
:
1
,
"projects_limit"
:
10
,
"current_sign_in_at"
:
null
,
...
...
doc/api/session.md
View file @
c780ad0e
...
...
@@ -41,7 +41,6 @@ Example response:
"twitter"
:
""
,
"website_url"
:
""
,
"email"
:
"john@example.com"
,
"theme_id"
:
1
,
"color_scheme_id"
:
1
,
"projects_limit"
:
10
,
"current_sign_in_at"
:
"2015-07-07T07:10:58.392Z"
,
...
...
doc/api/users.md
View file @
c780ad0e
...
...
@@ -72,7 +72,6 @@ GET /users
"organization"
:
""
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
2
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
...
...
@@ -105,7 +104,6 @@ GET /users
"organization"
:
""
,
"last_sign_in_at"
:
null
,
"confirmed_at"
:
"2012-05-30T16:53:06.148Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
3
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2014-03-19T17:54:13Z"
,
...
...
@@ -198,7 +196,6 @@ Parameters:
"organization"
:
""
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
2
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
...
...
@@ -323,7 +320,6 @@ GET /user
"organization"
:
""
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
2
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
...
...
@@ -369,7 +365,6 @@ GET /user
"organization"
:
""
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
2
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
...
...
lib/api/entities.rb
View file @
c780ad0e
...
...
@@ -26,7 +26,7 @@ module API
expose
:last_sign_in_at
expose
:confirmed_at
expose
:email
expose
:
theme_id
,
:
color_scheme_id
,
:projects_limit
,
:current_sign_in_at
expose
:color_scheme_id
,
:projects_limit
,
:current_sign_in_at
expose
:identities
,
using:
Entities
::
Identity
expose
:can_create_group?
,
as: :can_create_group
expose
:can_create_project?
,
as: :can_create_project
...
...
spec/controllers/profiles/preferences_controller_spec.rb
View file @
c780ad0e
...
...
@@ -25,8 +25,7 @@ describe Profiles::PreferencesController do
def
go
(
params:
{},
format: :js
)
params
.
reverse_merge!
(
color_scheme_id:
'1'
,
dashboard:
'stars'
,
theme_id:
'1'
dashboard:
'stars'
)
patch
:update
,
user:
params
,
format:
format
...
...
@@ -41,8 +40,7 @@ describe Profiles::PreferencesController do
it
"changes the user's preferences"
do
prefs
=
{
color_scheme_id:
'1'
,
dashboard:
'stars'
,
theme_id:
'2'
dashboard:
'stars'
}.
with_indifferent_access
expect
(
user
).
to
receive
(
:update_attributes
).
with
(
prefs
)
...
...
spec/fixtures/api/schemas/user/login.json
View file @
c780ad0e
...
...
@@ -19,7 +19,6 @@
"organization"
,
"last_sign_in_at"
,
"confirmed_at"
,
"theme_id"
,
"color_scheme_id"
,
"projects_limit"
,
"current_sign_in_at"
,
...
...
spec/fixtures/api/schemas/user/public.json
View file @
c780ad0e
...
...
@@ -19,7 +19,6 @@
"organization"
,
"last_sign_in_at"
,
"confirmed_at"
,
"theme_id"
,
"color_scheme_id"
,
"projects_limit"
,
"current_sign_in_at"
,
...
...
@@ -54,7 +53,6 @@
"organization"
:
{
"type"
:
[
"string"
,
"null"
]
},
"last_sign_in_at"
:
{
"type"
:
"date"
},
"confirmed_at"
:
{
"type"
:
[
"date"
,
"null"
]
},
"theme_id"
:
{
"type"
:
"integer"
},
"color_scheme_id"
:
{
"type"
:
"integer"
},
"projects_limit"
:
{
"type"
:
"integer"
},
"current_sign_in_at"
:
{
"type"
:
"date"
},
...
...
spec/models/user_spec.rb
View file @
c780ad0e
...
...
@@ -587,12 +587,11 @@ describe User, models: true do
end
describe
'with default overrides'
do
let
(
:user
)
{
User
.
new
(
projects_limit:
123
,
can_create_group:
false
,
can_create_team:
true
,
theme_id:
1
)
}
let
(
:user
)
{
User
.
new
(
projects_limit:
123
,
can_create_group:
false
,
can_create_team:
true
)
}
it
"applies defaults to user"
do
expect
(
user
.
projects_limit
).
to
eq
(
123
)
expect
(
user
.
can_create_group
).
to
be_falsey
expect
(
user
.
theme_id
).
to
eq
(
1
)
end
end
...
...
spec/support/gitlab_stubs/session.json
View file @
c780ad0e
...
...
@@ -7,7 +7,7 @@
"skype"
:
"aertert"
,
"linkedin"
:
""
,
"twitter"
:
""
,
"
theme_id"
:
2
,
"
color_scheme_id"
:
2
,
"color_scheme_id"
:
2
,
"state"
:
"active"
,
"created_at"
:
"2012-12-21T13:02:20Z"
,
"extern_uid"
:
null
,
...
...
spec/support/gitlab_stubs/user.json
View file @
c780ad0e
...
...
@@ -7,7 +7,7 @@
"skype"
:
"aertert"
,
"linkedin"
:
""
,
"twitter"
:
""
,
"
theme_id"
:
2
,
"
color_scheme_id"
:
2
,
"color_scheme_id"
:
2
,
"state"
:
"active"
,
"created_at"
:
"2012-12-21T13:02:20Z"
,
"extern_uid"
:
null
,
...
...
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