fix: hide Edit/Delete buttons for non-admin users on bounties page#271
Open
shengtenghou4-star wants to merge 6 commits into
Open
fix: hide Edit/Delete buttons for non-admin users on bounties page#271shengtenghou4-star wants to merge 6 commits into
shengtenghou4-star wants to merge 6 commits into
Conversation
Add permission check to only show Edit Amount and Delete buttons when current_user_role is :admin or :mod. This prevents unauthorized users from seeing buttons they cannot use, improving UX and avoiding confusion. Fixes: algora-io#238
e72c75b to
626d41a
Compare
When a user's GitHub username changes (e.g., from 'shravan20' to 'zhravan'), their last_context still points to the old username. On login, the system would redirect to /oldusername/dashboard causing a 404. Now it validates the handle exists before redirecting, falling back to /home if not found. Fixes: algora-io#183
Prevent alert spamming from automated subdomain enumeration tools (bug bounty scanners, security testing, etc.) Fixes: algora-io#201
Show 'posted X ago' timestamp on bounties listing to help contributors prioritize and identify new/active bounties. Fixes: algora-io#175
The bot was re-processing /attempt commands when comments were edited, causing duplicate bounty responses. Now only processes on comment creation. Fixes: algora-io#141
Users can now withdraw their job applications. Added withdraw_application function to Jobs module and withraw_job event handler to jobs_live. Changed 'Applied' button to 'Withdraw' to allow cancellation. Fixes: algora-io#171
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix 7 bugs reported by users:
Changes
lib/algora_web/live/org/bounties_live.ex: Add permission check for Edit/Delete buttonslib/algora_web/controllers/user_auth.ex: Validate handle exists before redirectlib/algora_web/endpoint.ex: Change alert severity to :infolib/algora_web/components/bounties.ex: Add time_ago displaylib/algora_web/controllers/webhooks/github_controller.ex: Only process /attempt on comment creationlib/algora/jobs/jobs.ex: Add withdraw_application functionlib/algora_web/live/jobs_live.ex: Add withdraw_job event handler and buttonTest plan
Fixes #238
Fixes #183
Fixes #201
Fixes #175
Fixes #141
Fixes #171
Fixes #173