Skip to content

Admin Notes for Groups

Harish Ramachandran requested to merge admin-group-notes into master

What does this MR do?

This merge request adds the option for admins to leave a note for each group, visible to only other admins. See #26468 (closed) for the discussion.

Closes #26468 (closed)

Screenshots (strongly suggested)

Administrative notes for a group will only be visible to the instance administrators, so they are only available in the Admin area.

An admin can create a new administrative note for a group when creating the group in the Admin Area (Admin Area -> Groups -> New group):

Screen_Shot_2021-03-03_at_11.33.33_AM

Then it will be visible in the group's Admin page:

Screen_Shot_2021-03-03_at_11.34.33_AM

An existing group may not have an administrative note. For these groups, no admin note will show in the group's Admin page:

Screen_Shot_2021-03-03_at_11.35.29_AM

When pressing Edit, one can be added at the bottom of the page:

Screen_Shot_2021-03-03_at_11.37.46_AM

...and then it will be visible for all admins to see:

Screen_Shot_2021-03-03_at_11.38.23_AM

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

Database

Migration output:

$ bundle exec rake db:migrate:redo VERSION=20201218194311
WARNING: This version of GitLab depends on gitlab-shell 13.16.1, but you're running 13.14.0. Please update gitlab-shell.
== 20201218194311 CreateAdminNotes: reverting =================================
-- drop_table(:namespace_admin_notes)
   -> 0.0034s
== 20201218194311 CreateAdminNotes: reverted (0.0035s) ========================

== 20201218194311 CreateAdminNotes: migrating =================================
-- create_table(:namespace_admin_notes, {})
-- quote_column_name(:note)
   -> 0.0000s
   -> 0.0127s
-- quote_table_name("check_e9d2e71b5d")
   -> 0.0000s
-- quote_table_name(:namespace_admin_notes)
   -> 0.0000s
-- execute("ALTER TABLE \"namespace_admin_notes\"\nADD CONSTRAINT \"check_e9d2e71b5d\" CHECK (char_length(\"note\") <= 1000)\n")
   -> 0.0009s
== 20201218194311 CreateAdminNotes: migrated (0.0244s) ========================
Edited by Harish Ramachandran

Merge request reports