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
c045bb54
Commit
c045bb54
authored
Oct 04, 2021
by
Magdalena Frankiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove bio-html and cached_markdown_version from user_details
Stop exposing bio-html in API Changelog: removed
parent
c799e7be
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
+12
-11
app/models/user_detail.rb
app/models/user_detail.rb
+1
-1
db/post_migrate/20211004151202_remove_bio_html_from_user_details.rb
...grate/20211004151202_remove_bio_html_from_user_details.rb
+10
-0
db/schema_migrations/20211004151202
db/schema_migrations/20211004151202
+1
-0
db/structure.sql
db/structure.sql
+0
-2
lib/api/entities/user.rb
lib/api/entities/user.rb
+0
-8
No files found.
app/models/user_detail.rb
View file @
c045bb54
...
...
@@ -4,7 +4,7 @@ class UserDetail < ApplicationRecord
extend
::
Gitlab
::
Utils
::
Override
include
IgnorableColumns
ignore_columns
%i[bio_html cached_markdown_version]
,
remove_with:
'1
3.6
'
,
remove_after:
'2021-10-22'
ignore_columns
%i[bio_html cached_markdown_version]
,
remove_with:
'1
4.5
'
,
remove_after:
'2021-10-22'
REGISTRATION_OBJECTIVE_PAIRS
=
{
basics:
0
,
move_repository:
1
,
code_storage:
2
,
exploring:
3
,
ci:
4
,
other:
5
,
joining_team:
6
}.
freeze
...
...
db/post_migrate/20211004151202_remove_bio_html_from_user_details.rb
0 → 100644
View file @
c045bb54
# frozen_string_literal: true
class
RemoveBioHtmlFromUserDetails
<
Gitlab
::
Database
::
Migration
[
1.0
]
enable_lock_retries!
def
change
remove_column
:user_details
,
:bio_html
,
:text
,
null:
true
remove_column
:user_details
,
:cached_markdown_version
,
:integer
,
null:
true
end
end
db/schema_migrations/20211004151202
0 → 100644
View file @
c045bb54
88f8e8391a480450a3d76d98f089e1e2287048007d0ecdcbd0799c9cc021481f
\ No newline at end of file
db/structure.sql
View file @
c045bb54
...
...
@@ -19847,8 +19847,6 @@ CREATE TABLE user_details (
user_id bigint NOT NULL,
job_title character varying(200) DEFAULT ''::character varying NOT NULL,
bio character varying(255) DEFAULT ''::character varying NOT NULL,
bio_html text,
cached_markdown_version integer,
webauthn_xid text,
other_role text,
provisioned_by_group_id bigint,
lib/api/entities/user.rb
View file @
c045bb54
...
...
@@ -5,7 +5,6 @@ module API
class
User
<
UserBasic
include
UsersHelper
include
TimeZoneHelper
include
ActionView
::
Helpers
::
SanitizeHelper
expose
:created_at
,
if:
->
(
user
,
opts
)
{
Ability
.
allowed?
(
opts
[
:current_user
],
:read_user_profile
,
user
)
}
expose
:bio
,
:location
,
:public_email
,
:skype
,
:linkedin
,
:twitter
,
:website_url
,
:organization
,
:job_title
,
:pronouns
...
...
@@ -19,13 +18,6 @@ module API
expose
:following
,
if:
->
(
user
,
opts
)
{
Ability
.
allowed?
(
opts
[
:current_user
],
:read_user_profile
,
user
)
}
do
|
user
|
user
.
followees
.
size
end
# This is only for multi version compatibility reasons, as we removed user.bio_html
# to be removed in 14.4
expose
:bio_html
do
|
user
|
strip_tags
(
user
.
bio
)
end
expose
:local_time
do
|
user
|
local_time
(
user
.
timezone
)
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