Group visibility levels: Show alert for restricted visibility levels
-
Please check this box if this contribution uses AI-generated content as outlined in the GitLab DCO & CLA
What does this MR do and why?
As explained here, we noticed that there is no text hint for the users regarding the restricted visibility level when only one visibility level is restricted. This MR intends to fix this.
Additionally, this MR proposes the usage of a Pajama::AlertComponent
to make the alert more present.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
MR Checklist (@gerardo-navarro)
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
Screenshots or screen recordings
The following screenshots shows the page when only one visibility is restricted. In this case, the visibility level "public" was restricted. As can be seen, there is no text hint similar to Other visibility settings have been disabled by the administrator.
when one visibility level is restricted which can be considered a bug
Before | After |
---|---|
The following screenshots shows the page when only multiple visibility is restricted. In this case, the visibility levels "public" and "internal" were restricted.
Before | After |
---|---|
How to set up and validate locally
- Sign in as the admin user
- Go to Admin Area => Settings => General => Section
Visibility and access control
: http://gdk.test:3000/admin/application_settings/general#js-visibility-settings - In the section
Restricted visibility levels
, checkPublic
as one of the restricted restricted visibility levels - In a private browser tab, sign in as the non-admin user
- Go to the create new group page: http://gdk.test:3000/groups/new
- You should see the warning alert regarding the restricted visibility levels
Ref #455668