Resolve "Bug with visibility levels in snippets when VUE is enabled"
What does this MR do?
The MR connects snippet's "Visibility level" radio buttons with admin settings in /admin/application_settings/general#js-visibility-settings
to reflect all possible restrictions that can be driven from the admin settings.
NB: since the whole Vue refactoring of the snippet edit form is still behind a feature flag, the changelog entry has not been provided.
How to click-test
- Enable
:snippets_edit_vue
feature flag in Rails console - Logged in as admin, go to
/admin/application_settings/general#js-visibility-settings
and play with the following settings:- Restricted visibility levels, and
- Default snippet visibility
- Open another browser or an Incognito tag of the current browser and log in as a regular user (not admin)
- Go to
/-/snippets/new
and make sure the "Visibility level" field (right below the blob) follow the settings set on step 2
Screenshots
Settings | Before | After |
---|---|---|
|
||
|
||
|
||
|
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
References #241468 (closed)
Edited by Denys Mishunov