Skip to content

Add a locked state to approval settings checkbox

What does this MR do?

This MR adds optional locked & lockedText properties to the approval settings checkbox as described in #335962 (closed).

When a locked is true, the component should:

  • Disable the checkbox input.
  • Display a lock icon.
  • The lock icon should have a popover with the lockedText message.

This will be used by the ApprovalSettings component to lock settings for a project #332548 (closed) or group #332549 (closed).

Screenshots or Screencasts (strongly suggested)

Before After Design
image image image

Local testing & setup

  1. You need a GitLab Ultimate license.
  2. Enable the feature flag: echo "Feature.enable(:group_merge_request_approval_settings_feature_flag)" | rails c
  3. View the Merge request approvals in [GDK_HOST]/groups/gitlab-org/-/edit.
  4. Open vue dev tools and edit the lockedBy value of any ApprovalSettingsCheckbox component.
  5. Verify that it does what is outlined in the MR's description.

Kapture_2021-07-21_at_14.27.34

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

Related to #335962 (closed)

Edited by Jiaan Louw

Merge request reports