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
Jérome Perrin
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
Hide 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
...
@@ -603,4 +603,4 @@ test:
...
@@ -603,4 +603,4 @@ test:
admin_group: ''
admin_group: ''
staging:
staging:
<<: *base
<<: *base
\ No newline at end of file
db/migrate/20170213172852_remove_theme_id_from_users.rb
View file @
c780ad0e
...
@@ -5,7 +5,7 @@ class RemoveThemeIdFromUsers < ActiveRecord::Migration
...
@@ -5,7 +5,7 @@ class RemoveThemeIdFromUsers < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
# 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
# When a migration requires downtime you **must** uncomment the following
# constant and define a short and easy to understand explanation as to why the
# 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
...
@@ -109,8 +109,8 @@ ActiveRecord::Schema.define(version: 20170213172852) do
t
.
boolean
"html_emails_enabled"
,
default:
true
t
.
boolean
"html_emails_enabled"
,
default:
true
t
.
string
"plantuml_url"
t
.
string
"plantuml_url"
t
.
boolean
"plantuml_enabled"
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
"max_pages_size"
,
default:
100
,
null:
false
t
.
integer
"terminal_max_session_time"
,
default:
0
,
null:
false
end
end
create_table
"audit_events"
,
force: :cascade
do
|
t
|
create_table
"audit_events"
,
force: :cascade
do
|
t
|
...
...
doc/api/keys.md
View file @
c780ad0e
...
@@ -33,7 +33,6 @@ Parameters:
...
@@ -33,7 +33,6 @@ Parameters:
"twitter"
:
""
,
"twitter"
:
""
,
"website_url"
:
""
,
"website_url"
:
""
,
"email"
:
"john@example.com"
,
"email"
:
"john@example.com"
,
"theme_id"
:
2
,
"color_scheme_id"
:
1
,
"color_scheme_id"
:
1
,
"projects_limit"
:
10
,
"projects_limit"
:
10
,
"current_sign_in_at"
:
null
,
"current_sign_in_at"
:
null
,
...
...
doc/api/session.md
View file @
c780ad0e
...
@@ -41,7 +41,6 @@ Example response:
...
@@ -41,7 +41,6 @@ Example response:
"twitter"
:
""
,
"twitter"
:
""
,
"website_url"
:
""
,
"website_url"
:
""
,
"email"
:
"john@example.com"
,
"email"
:
"john@example.com"
,
"theme_id"
:
1
,
"color_scheme_id"
:
1
,
"color_scheme_id"
:
1
,
"projects_limit"
:
10
,
"projects_limit"
:
10
,
"current_sign_in_at"
:
"2015-07-07T07:10:58.392Z"
,
"current_sign_in_at"
:
"2015-07-07T07:10:58.392Z"
,
...
...
doc/api/users.md
View file @
c780ad0e
...
@@ -72,7 +72,6 @@ GET /users
...
@@ -72,7 +72,6 @@ GET /users
"organization"
:
""
,
"organization"
:
""
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
2
,
"color_scheme_id"
:
2
,
"projects_limit"
:
100
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
...
@@ -105,7 +104,6 @@ GET /users
...
@@ -105,7 +104,6 @@ GET /users
"organization"
:
""
,
"organization"
:
""
,
"last_sign_in_at"
:
null
,
"last_sign_in_at"
:
null
,
"confirmed_at"
:
"2012-05-30T16:53:06.148Z"
,
"confirmed_at"
:
"2012-05-30T16:53:06.148Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
3
,
"color_scheme_id"
:
3
,
"projects_limit"
:
100
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2014-03-19T17:54:13Z"
,
"current_sign_in_at"
:
"2014-03-19T17:54:13Z"
,
...
@@ -198,7 +196,6 @@ Parameters:
...
@@ -198,7 +196,6 @@ Parameters:
"organization"
:
""
,
"organization"
:
""
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
2
,
"color_scheme_id"
:
2
,
"projects_limit"
:
100
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
...
@@ -323,7 +320,6 @@ GET /user
...
@@ -323,7 +320,6 @@ GET /user
"organization"
:
""
,
"organization"
:
""
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
2
,
"color_scheme_id"
:
2
,
"projects_limit"
:
100
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
...
@@ -369,7 +365,6 @@ GET /user
...
@@ -369,7 +365,6 @@ GET /user
"organization"
:
""
,
"organization"
:
""
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"last_sign_in_at"
:
"2012-06-01T11:41:01Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"confirmed_at"
:
"2012-05-23T09:05:22Z"
,
"theme_id"
:
1
,
"color_scheme_id"
:
2
,
"color_scheme_id"
:
2
,
"projects_limit"
:
100
,
"projects_limit"
:
100
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
"current_sign_in_at"
:
"2012-06-02T06:36:55Z"
,
...
...
lib/api/entities.rb
View file @
c780ad0e
...
@@ -26,7 +26,7 @@ module API
...
@@ -26,7 +26,7 @@ module API
expose
:last_sign_in_at
expose
:last_sign_in_at
expose
:confirmed_at
expose
:confirmed_at
expose
:email
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
:identities
,
using:
Entities
::
Identity
expose
:can_create_group?
,
as: :can_create_group
expose
:can_create_group?
,
as: :can_create_group
expose
:can_create_project?
,
as: :can_create_project
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
...
@@ -25,8 +25,7 @@ describe Profiles::PreferencesController do
def
go
(
params:
{},
format: :js
)
def
go
(
params:
{},
format: :js
)
params
.
reverse_merge!
(
params
.
reverse_merge!
(
color_scheme_id:
'1'
,
color_scheme_id:
'1'
,
dashboard:
'stars'
,
dashboard:
'stars'
theme_id:
'1'
)
)
patch
:update
,
user:
params
,
format:
format
patch
:update
,
user:
params
,
format:
format
...
@@ -41,8 +40,7 @@ describe Profiles::PreferencesController do
...
@@ -41,8 +40,7 @@ describe Profiles::PreferencesController do
it
"changes the user's preferences"
do
it
"changes the user's preferences"
do
prefs
=
{
prefs
=
{
color_scheme_id:
'1'
,
color_scheme_id:
'1'
,
dashboard:
'stars'
,
dashboard:
'stars'
theme_id:
'2'
}.
with_indifferent_access
}.
with_indifferent_access
expect
(
user
).
to
receive
(
:update_attributes
).
with
(
prefs
)
expect
(
user
).
to
receive
(
:update_attributes
).
with
(
prefs
)
...
...
spec/fixtures/api/schemas/user/login.json
View file @
c780ad0e
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
"organization"
,
"organization"
,
"last_sign_in_at"
,
"last_sign_in_at"
,
"confirmed_at"
,
"confirmed_at"
,
"theme_id"
,
"color_scheme_id"
,
"color_scheme_id"
,
"projects_limit"
,
"projects_limit"
,
"current_sign_in_at"
,
"current_sign_in_at"
,
...
...
spec/fixtures/api/schemas/user/public.json
View file @
c780ad0e
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
"organization"
,
"organization"
,
"last_sign_in_at"
,
"last_sign_in_at"
,
"confirmed_at"
,
"confirmed_at"
,
"theme_id"
,
"color_scheme_id"
,
"color_scheme_id"
,
"projects_limit"
,
"projects_limit"
,
"current_sign_in_at"
,
"current_sign_in_at"
,
...
@@ -32,14 +31,14 @@
...
@@ -32,14 +31,14 @@
"properties"
:
{
"properties"
:
{
"id"
:
{
"type"
:
"integer"
},
"id"
:
{
"type"
:
"integer"
},
"username"
:
{
"type"
:
"string"
},
"username"
:
{
"type"
:
"string"
},
"email"
:
{
"email"
:
{
"type"
:
"string"
,
"type"
:
"string"
,
"pattern"
:
"^[^@]+@[^@]+$"
"pattern"
:
"^[^@]+@[^@]+$"
},
},
"name"
:
{
"type"
:
"string"
},
"name"
:
{
"type"
:
"string"
},
"state"
:
{
"state"
:
{
"type"
:
"string"
,
"type"
:
"string"
,
"enum"
:
[
"active"
,
"blocked"
]
"enum"
:
[
"active"
,
"blocked"
]
},
},
"avatar_url"
:
{
"type"
:
"string"
},
"avatar_url"
:
{
"type"
:
"string"
},
"web_url"
:
{
"type"
:
"string"
},
"web_url"
:
{
"type"
:
"string"
},
...
@@ -54,18 +53,17 @@
...
@@ -54,18 +53,17 @@
"organization"
:
{
"type"
:
[
"string"
,
"null"
]
},
"organization"
:
{
"type"
:
[
"string"
,
"null"
]
},
"last_sign_in_at"
:
{
"type"
:
"date"
},
"last_sign_in_at"
:
{
"type"
:
"date"
},
"confirmed_at"
:
{
"type"
:
[
"date"
,
"null"
]
},
"confirmed_at"
:
{
"type"
:
[
"date"
,
"null"
]
},
"theme_id"
:
{
"type"
:
"integer"
},
"color_scheme_id"
:
{
"type"
:
"integer"
},
"color_scheme_id"
:
{
"type"
:
"integer"
},
"projects_limit"
:
{
"type"
:
"integer"
},
"projects_limit"
:
{
"type"
:
"integer"
},
"current_sign_in_at"
:
{
"type"
:
"date"
},
"current_sign_in_at"
:
{
"type"
:
"date"
},
"identities"
:
{
"identities"
:
{
"type"
:
"array"
,
"type"
:
"array"
,
"items"
:
{
"items"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"properties"
:
{
"properties"
:
{
"provider"
:
{
"provider"
:
{
"type"
:
"string"
,
"type"
:
"string"
,
"enum"
:
[
"github"
,
"bitbucket"
,
"google_oauth2"
]
"enum"
:
[
"github"
,
"bitbucket"
,
"google_oauth2"
]
},
},
"extern_uid"
:
{
"type"
:
[
"number"
,
"string"
]
}
"extern_uid"
:
{
"type"
:
[
"number"
,
"string"
]
}
}
}
...
@@ -74,6 +72,6 @@
...
@@ -74,6 +72,6 @@
"can_create_group"
:
{
"type"
:
"boolean"
},
"can_create_group"
:
{
"type"
:
"boolean"
},
"can_create_project"
:
{
"type"
:
"boolean"
},
"can_create_project"
:
{
"type"
:
"boolean"
},
"two_factor_enabled"
:
{
"type"
:
"boolean"
},
"two_factor_enabled"
:
{
"type"
:
"boolean"
},
"external"
:
{
"type"
:
"boolean"
}
"external"
:
{
"type"
:
"boolean"
}
}
}
}
}
spec/models/user_spec.rb
View file @
c780ad0e
...
@@ -587,12 +587,11 @@ describe User, models: true do
...
@@ -587,12 +587,11 @@ describe User, models: true do
end
end
describe
'with default overrides'
do
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
it
"applies defaults to user"
do
expect
(
user
.
projects_limit
).
to
eq
(
123
)
expect
(
user
.
projects_limit
).
to
eq
(
123
)
expect
(
user
.
can_create_group
).
to
be_falsey
expect
(
user
.
can_create_group
).
to
be_falsey
expect
(
user
.
theme_id
).
to
eq
(
1
)
end
end
end
end
...
...
spec/support/gitlab_stubs/session.json
View file @
c780ad0e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"skype"
:
"aertert"
,
"skype"
:
"aertert"
,
"linkedin"
:
""
,
"linkedin"
:
""
,
"twitter"
:
""
,
"twitter"
:
""
,
"
theme_id"
:
2
,
"
color_scheme_id"
:
2
,
"color_scheme_id"
:
2
,
"state"
:
"active"
,
"state"
:
"active"
,
"created_at"
:
"2012-12-21T13:02:20Z"
,
"created_at"
:
"2012-12-21T13:02:20Z"
,
"extern_uid"
:
null
,
"extern_uid"
:
null
,
...
@@ -17,4 +17,4 @@
...
@@ -17,4 +17,4 @@
"can_create_project"
:
false
,
"can_create_project"
:
false
,
"private_token"
:
"Wvjy2Krpb7y8xi93owUz"
,
"private_token"
:
"Wvjy2Krpb7y8xi93owUz"
,
"access_token"
:
"Wvjy2Krpb7y8xi93owUz"
"access_token"
:
"Wvjy2Krpb7y8xi93owUz"
}
}
\ No newline at end of file
spec/support/gitlab_stubs/user.json
View file @
c780ad0e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"skype"
:
"aertert"
,
"skype"
:
"aertert"
,
"linkedin"
:
""
,
"linkedin"
:
""
,
"twitter"
:
""
,
"twitter"
:
""
,
"
theme_id"
:
2
,
"
color_scheme_id"
:
2
,
"color_scheme_id"
:
2
,
"state"
:
"active"
,
"state"
:
"active"
,
"created_at"
:
"2012-12-21T13:02:20Z"
,
"created_at"
:
"2012-12-21T13:02:20Z"
,
"extern_uid"
:
null
,
"extern_uid"
:
null
,
...
@@ -17,4 +17,4 @@
...
@@ -17,4 +17,4 @@
"can_create_project"
:
false
,
"can_create_project"
:
false
,
"private_token"
:
"Wvjy2Krpb7y8xi93owUz"
,
"private_token"
:
"Wvjy2Krpb7y8xi93owUz"
,
"access_token"
:
"Wvjy2Krpb7y8xi93owUz"
"access_token"
:
"Wvjy2Krpb7y8xi93owUz"
}
}
\ No newline at end of file
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