IntersectMBO / IntersectMBO/govtool

Update "View Details and Vote" Button Text Based on User Permissions

Open
#3,109 4 comments 0 reactions 1 assignee Assigned to @Ciabas View on GitHub
Dominant language
HTML
Stars
21
Forks
29
Avg merge
2d 22h
Merged PRs (30d)
7

Description

## What
On the Governance Action list page, the **"View Details and Vote"** button is always displayed, even when a user does not have permission to vote. To improve clarity, the button text should change to **"View Details"** if the user is not allowed to vote.

## Why
- Prevents confusion for users who do not have voting permissions.
- Improves user experience by ensuring clear and accurate UI labels.
- Aligns button behavior with user roles and permissions.
- Reduces potential frustration from users clicking a button expecting to vote but being unable to.

## How
- Identify the logic that controls button text rendering on the Governance Action list page.
- Implement a condition that checks whether the user has voting permissions:
- If the user **can** vote → display **"View Details and Vote"**.
- If the user **cannot** vote → display **"View Details"**.
- Ensure that button behavior remains unchanged aside from the text update.
- Validate the change through UI tests to confirm correct behavior.

## Acceptance Criteria
- [ ] The button displays **"View Details"** if the user is not allowed to vote.
- [ ] The button displays **"View Details and Vote"** if the user has voting permissions.
- [ ] Button functionality remains unchanged apart from the text update.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.