Skip to content

fix: hide unauthorized bounty actions on org bounties page#301

Open
moixbot wants to merge 1 commit into
algora-io:mainfrom
moixbot:fix/bounty-238-hide-unauthorized-actions
Open

fix: hide unauthorized bounty actions on org bounties page#301
moixbot wants to merge 1 commit into
algora-io:mainfrom
moixbot:fix/bounty-238-hide-unauthorized-actions

Conversation

@moixbot
Copy link
Copy Markdown

@moixbot moixbot commented May 24, 2026

Summary

Fixes #238.

Hide Edit Amount and Delete actions on the org bounties page for users who are not authorized to manage bounties.

Root Cause

The backend already rejects unauthorized edit-bounty-amount and delete-bounty events, but the buttons were still rendered for all logged-in users. That created a misleading UI path where users could click actions they were not allowed to perform.

Changes

  • render bounty action buttons only when @current_user_role in [:admin, :mod]
  • leave existing server-side authorization checks in place

Result

  • unauthorized users no longer see admin/mod-only bounty actions
  • admins and mods keep the existing edit/delete workflow
  • UI behavior now matches backend permissions

Verification

  • confirmed the action cell is now role-gated in Org.BountiesLive
  • backend authorization logic remains unchanged
  • test suite was not run in this environment because Elixir/Mix is not installed here

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 24, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI Bug] Unauthorized 'Edit' and 'Delete' buttons visible on /bounties page

2 participants