Skip to content

Resolve "Allow users to specify pronouns"

What does this MR do?

This is a very basic MVC for #332405 🙂

This change:

  • Allows a user to set their pronouns from the /-/profile page. (Its not a list, so users can write their own pronouns in the text field)

Screen_Shot_2021-06-04_at_9.08.58_AM

  • Displays the set pronouns adjacent to their name in /:username page.

Screen_Shot_2021-06-03_at_7.55.19_PM

DB Migrations

UP migrations

rake db:migrate
== 20210603140302 AddPronounsToUserDetails: migrating =========================
-- add_column(:user_details, :pronouns, :text, {:null=>true})
   -> 0.0023s
== 20210603140302 AddPronounsToUserDetails: migrated (0.0098s) ================

== 20210607050531 AddTextLimitToUserDetailsPronouns: migrating ================
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0004s
-- execute("ALTER TABLE user_details\nADD CONSTRAINT check_eeeaf8d4f0\nCHECK ( char_length(pronouns) <= 50 )\nNOT VALID;\n")
   -> 0.0045s
-- current_schema()
   -> 0.0003s
-- execute("SET statement_timeout TO 0")
   -> 0.0006s
-- execute("ALTER TABLE user_details VALIDATE CONSTRAINT check_eeeaf8d4f0;")
   -> 0.0018s
-- execute("RESET ALL")
   -> 0.0006s
== 20210607050531 AddTextLimitToUserDetailsPronouns: migrated (0.0173s) =======

DOWN migrations

rake db:migrate:down VERSION=20210607050531
== 20210607050531 AddTextLimitToUserDetailsPronouns: reverting ================
-- execute("ALTER TABLE user_details\nDROP CONSTRAINT IF EXISTS check_eeeaf8d4f0\n")
   -> 0.0038s
== 20210607050531 AddTextLimitToUserDetailsPronouns: reverted (0.0152s) =======
rake db:migrate:down VERSION=20210603140302
== 20210603140302 AddPronounsToUserDetails: reverting =========================
-- remove_column(:user_details, :pronouns)
   -> 0.0031s
== 20210603140302 AddPronounsToUserDetails: reverted (0.0131s) ================

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] 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