Skip to content

fix: hide delete workspace button when user doesn't have permission#42

Closed
cdr-robot wants to merge 1 commit into
mainfrom
fix-delete-workspace-button-permissions
Closed

fix: hide delete workspace button when user doesn't have permission#42
cdr-robot wants to merge 1 commit into
mainfrom
fix-delete-workspace-button-permissions

Conversation

@cdr-robot
Copy link
Copy Markdown
Contributor

Summary

  • Fixes the issue where the delete workspace button appears even if the user doesn't have permission to delete the workspace
  • Adds a deleteWorkspace permission check to the RBAC system
  • Conditionally renders the delete button based on permissions

Fixes #21

Test plan

  1. Create a user that doesn't have permission to delete a specific workspace
  2. Log in as that user and verify the delete button is not shown
  3. Log in as a user with delete permissions and verify the delete button is shown

Workspace URL: https://demo.coder.com/ben/issue-21

🤖 Generated with Claude Code

Fixes the issue where the delete workspace button appears even if the user doesn't have
the permission to delete the workspace. Now the button is only shown when the user
has the 'delete' permission on the workspace resource.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the stale label May 3, 2025
@github-actions github-actions Bot closed this May 6, 2025
@github-actions github-actions Bot deleted the fix-delete-workspace-button-permissions branch November 1, 2025 01:09
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.

bug: Delete workspace button appears even if you do not have permission

1 participant