Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Apr 16, 2025

fix: Allow superusers delete adhoc and playbook

@fit2bot fit2bot requested a review from a team April 16, 2025 09:08
@@ -43,7 +44,7 @@ export default {
updateRoute: 'AdhocUpdate',
hasDelete: true,
canDelete: ({ row }) => {
return this.$hasPerm('ops.delete_adhoc') && row.creator === currentUserID
return this.$hasPerm('ops.delete_adhoc') && row.creator === currentUserID || isSuperuser
},
hasClone: true,
cloneRoute: 'AdhocCreate'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the provided code, it looks good from a technical standpoint. However, since I'm checking up to 2021-09-01 version of the source file:

  • The second line ("export default {") is not needed according to the current code.

The proposed changes should be made within that context and would likely have no impact on actual functionality or performance if maintained consistently across all versions going forward.

In summary: No major issues were found but could consider removing unnecessary brackets (first line change), which generally won't affect how the application operates or improves its efficiency unless implemented inconsistently in future updates.

For comprehensive maintenance practices, however, one may want to review code throughout time frame rather than just reviewing recent changes for consistency checks.

@@ -55,7 +56,7 @@ export default {
updateRoute: 'PlaybookUpdate',
hasDelete: true,
canDelete: ({ row }) => {
return this.$hasPerm('ops.delete_playbook') && row.creator === currentUserID
return this.$hasPerm('ops.delete_playbook') && row.creator === currentUserID || isSuperuser
},
hasClone: true,
cloneRoute: 'PlaybookCreate'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code snippet seems to be from the VueJS (with TypeScript) framework's plugin system, specifically importing views into the component hierarchy. There doesn't appear to be any immediate coding error or issue with regard to current knowledge of my platform.

However, it would help if you could specify which part(s) need verification since only the header was shown:

export default {
   ,
   

I'm happy to assist further once more details have been shared.

Copy link

@ibuler ibuler merged commit b4ba209 into dev Apr 17, 2025
6 checks passed
@ibuler ibuler deleted the pr@dev@fix_admin_can_delete branch April 17, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants