Fix edit title and description permissions
What does this MR do and why?
Fix edit title and description permissions
Fixes - Edit buttons for epic work items not appearing ... (#439660 - closed)
:Behind work_items_mvc_2 FF
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.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Enable
:work_items_mvc_2
FF - Apply the below patch
diff --git a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
index cd2721a635fd..2f10f1d4403c 100644
--- a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
+++ b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue
@@ -65,7 +65,7 @@ export default {
return this.workItem.workItemType?.name;
},
canUpdate() {
- return this.workItem?.userPermissions?.updateWorkItem;
+ return false;
},
canDelete() {
return this.workItem?.userPermissions?.deleteWorkItem;
diff --git a/app/assets/javascripts/work_items/components/work_item_detail.vue b/app/assets/javascripts/work_items/components/work_item_detail.vue
index 897063c4ad35..884d9408d84e 100644
--- a/app/assets/javascripts/work_items/components/work_item_detail.vue
+++ b/app/assets/javascripts/work_items/components/work_item_detail.vue
@@ -164,7 +164,7 @@ export default {
return this.workItem.workItemType?.id;
},
canUpdate() {
- return this.workItem.userPermissions?.updateWorkItem;
+ return false;
},
canDelete() {
return this.workItem.userPermissions?.deleteWorkItem;
- See that none of the edit buttons are available when there are no permissions to update the work item