[WEB-2133] fix : Remove inbox delete option for members#5395
[WEB-2133] fix : Remove inbox delete option for members#5395SatishGandham merged 2 commits intopreviewfrom
Conversation
WalkthroughThe recent changes refine the permissions for deleting issues in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/components/inbox/content/inbox-issue-header.tsx (1 hunks)
Additional comments not posted (1)
web/core/components/inbox/content/inbox-issue-header.tsx (1)
86-89: LGTM! Verify the logic implementation across the codebase.The updated logic for
canDeletealigns with the PR objectives and enhances security by restricting deletion permissions to admins and issue creators.To ensure consistency, verify that this logic is correctly implemented throughout the codebase.
Run the following script to check for similar permission checks:
| const canDelete = isAllowed || inboxIssue?.created_by === currentUser?.id; | ||
| // can delete only if admin or is creator of the issue | ||
| const canDelete = | ||
| (!!currentProjectRole && currentProjectRole > EUserProjectRoles.MEMBER) || |
There was a problem hiding this comment.
NIT: Can you change it to >= admin?
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/components/inbox/content/inbox-issue-header.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- web/core/components/inbox/content/inbox-issue-header.tsx
This PR removes the option for deletion of issues for members if they are not the author of the issue.
Summary by CodeRabbit
New Features
Bug Fixes