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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0275f203
Commit
0275f203
authored
Sep 26, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add organization field to user profile
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
1025b390
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
2 deletions
+39
-2
CHANGELOG
CHANGELOG
+1
-0
app/controllers/profiles_controller.rb
app/controllers/profiles_controller.rb
+2
-1
app/views/profiles/show.html.haml
app/views/profiles/show.html.haml
+3
-0
db/migrate/20160926145521_add_organization_to_user.rb
db/migrate/20160926145521_add_organization_to_user.rb
+29
-0
db/schema.rb
db/schema.rb
+2
-1
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+2
-0
No files found.
CHANGELOG
View file @
0275f203
...
@@ -4,6 +4,7 @@ v 8.13.0 (unreleased)
...
@@ -4,6 +4,7 @@ v 8.13.0 (unreleased)
- Speed-up group milestones show page
- Speed-up group milestones show page
- Fix robots.txt disallowing access to groups starting with "s" (Matt Harrison)
- Fix robots.txt disallowing access to groups starting with "s" (Matt Harrison)
- Revoke button in Applications Settings underlines on hover.
- Revoke button in Applications Settings underlines on hover.
- Add organization field to user profile
v 8.12.2 (unreleased)
v 8.12.2 (unreleased)
- Fix Import/Export not recognising correctly the imported services.
- Fix Import/Export not recognising correctly the imported services.
...
...
app/controllers/profiles_controller.rb
View file @
0275f203
...
@@ -73,7 +73,8 @@ class ProfilesController < Profiles::ApplicationController
...
@@ -73,7 +73,8 @@ class ProfilesController < Profiles::ApplicationController
:skype
,
:skype
,
:twitter
,
:twitter
,
:username
,
:username
,
:website_url
:website_url
,
:organization
)
)
end
end
end
end
app/views/profiles/show.html.haml
View file @
0275f203
...
@@ -86,6 +86,9 @@
...
@@ -86,6 +86,9 @@
.form-group
.form-group
=
f
.
label
:location
,
'Location'
,
class:
"label-light"
=
f
.
label
:location
,
'Location'
,
class:
"label-light"
=
f
.
text_field
:location
,
class:
"form-control"
=
f
.
text_field
:location
,
class:
"form-control"
.form-group
=
f
.
label
:organization
,
'Organization'
,
class:
"label-light"
=
f
.
text_field
:organization
,
class:
"form-control"
.form-group
.form-group
=
f
.
label
:bio
,
class:
"label-light"
=
f
.
label
:bio
,
class:
"label-light"
=
f
.
text_area
:bio
,
rows:
4
,
class:
"form-control"
,
maxlength:
250
=
f
.
text_area
:bio
,
rows:
4
,
class:
"form-control"
,
maxlength:
250
...
...
db/migrate/20160926145521_add_organization_to_user.rb
0 → 100644
View file @
0275f203
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddOrganizationToUser
<
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
add_column
:users
,
:organization
,
:string
end
end
db/schema.rb
View file @
0275f203
...
@@ -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:
2016092
0160832
)
do
ActiveRecord
::
Schema
.
define
(
version:
2016092
6145521
)
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"
...
@@ -1132,6 +1132,7 @@ ActiveRecord::Schema.define(version: 20160920160832) do
...
@@ -1132,6 +1132,7 @@ ActiveRecord::Schema.define(version: 20160920160832) do
t
.
datetime
"otp_grace_period_started_at"
t
.
datetime
"otp_grace_period_started_at"
t
.
boolean
"ldap_email"
,
default:
false
,
null:
false
t
.
boolean
"ldap_email"
,
default:
false
,
null:
false
t
.
boolean
"external"
,
default:
false
t
.
boolean
"external"
,
default:
false
t
.
string
"organization"
end
end
add_index
"users"
,
[
"admin"
],
name:
"index_users_on_admin"
,
using: :btree
add_index
"users"
,
[
"admin"
],
name:
"index_users_on_admin"
,
using: :btree
...
...
features/steps/profile/profile.rb
View file @
0275f203
...
@@ -13,6 +13,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
...
@@ -13,6 +13,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
fill_in
'user_website_url'
,
with:
'testurl'
fill_in
'user_website_url'
,
with:
'testurl'
fill_in
'user_location'
,
with:
'Ukraine'
fill_in
'user_location'
,
with:
'Ukraine'
fill_in
'user_bio'
,
with:
'I <3 GitLab'
fill_in
'user_bio'
,
with:
'I <3 GitLab'
fill_in
'user_organization'
,
with:
'GitLab'
click_button
'Update profile settings'
click_button
'Update profile settings'
@user
.
reload
@user
.
reload
end
end
...
@@ -23,6 +24,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
...
@@ -23,6 +24,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
expect
(
@user
.
twitter
).
to
eq
'testtwitter'
expect
(
@user
.
twitter
).
to
eq
'testtwitter'
expect
(
@user
.
website_url
).
to
eq
'testurl'
expect
(
@user
.
website_url
).
to
eq
'testurl'
expect
(
@user
.
bio
).
to
eq
'I <3 GitLab'
expect
(
@user
.
bio
).
to
eq
'I <3 GitLab'
expect
(
@user
.
organization
).
to
eq
'GitLab'
expect
(
find
(
'#user_location'
).
value
).
to
eq
'Ukraine'
expect
(
find
(
'#user_location'
).
value
).
to
eq
'Ukraine'
end
end
...
...
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