Loading
Add createLabel to NamespacePermissions
What does this MR do and why?
The work item metadata query reads NamespacePermissions.adminLabel only to decide whether to show a "Create label" button. This adds createLabel next to it and moves the frontend to the new field. adminLabel stays as it is and still checks admin_label, since clients outside the web UI can query it. Nobody gains or loses access, since Reporter and Planner hold both permissions.
NamespacePermissionshas a newcreateLabelfield.- Both
work_item_metadata.query.graphqlfiles andwork_item_metadata_provider.vuereadcreateLabel. - The GraphQL reference docs and the introspection files are regenerated.
References
- https://gitlab.com/gitlab-org/gitlab/-/work_items/565525
- Review question this answers !257926 (comment 3966374523)
Screenshots or screen recordings
No UI change.
How to set up and validate locally
bundle exec rspec spec/graphql/types/permission_types/namespaces/base_spec.rb
yarn jest spec/frontend/work_items/components/work_item_metadata_provider_spec.js spec/frontend/work_items/components/work_item_labels_spec.js ee/spec/frontend/work_items/components/work_item_labels_spec.jsMR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Diane Russel