Skip to content

Support markdown in user's bio attribute

Adam Hegyi requested to merge add-markdown-support-in-bio into master

What does this MR do?

This MR adds support for markdown in the bio field on the user's profile.

The base of this MR is a community contribution which is inactive for quite some time: !20254 (closed)

Changes

In an earlier MR we've decided to move the bio attribute from the users table to user_details table. Now we're ready to ignore the users.bio column and use the user_details.bio. (Related MR: !27773 (merged))

Query to verify that the bios are identical in both tables:

select users.id, users.bio, user_details.bio from users inner join user_details on users.id=user_details.user_id where users.bio <> user_details.bio limit 1;
  • Store the html representation of the bio.
  • Render bio_html to the user popover.
  • Expose bio_html in our API.
  • Update the API docs.
  • Remap the validation error key for bio in the API: user_detail.bio => bio
  • Delegate bio and bio_html to user_detail

Screenshots

image

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Mayra Cabrera

Merge request reports