Skip to content

Comments

Add role-based input guard for contribution submissions#306

Merged
JoaquinBN merged 1 commit intodevfrom
JoaquinBN/submit-role-guard
Jan 9, 2026
Merged

Add role-based input guard for contribution submissions#306
JoaquinBN merged 1 commit intodevfrom
JoaquinBN/submit-role-guard

Conversation

@JoaquinBN
Copy link
Collaborator

Summary

Improved the submission form UX by enforcing role-based access to input fields. Users can now freely switch between Validator and Builder tabs, but the input field is disabled if they lack the required role for the selected category.

Changes

  • Added currentCategoryDisabled derived state to check if selected category role is missing
  • Made category tabs always clickable (users can freely switch)
  • Disabled input field and dropdown when selected category role is missing
  • Moved role requirement message below the selector with category-specific text

Test Plan

  1. Log in as user without validator or builder role - can switch tabs but inputs are disabled
  2. Log in as validator only - validator tab works, builder tab shows message
  3. Log in with both roles - all inputs enabled, no messages shown

- Allow users to freely switch between Validator and Builder tabs
- Disable input field when selected category role is missing
- Move role requirement message below selector with category-specific text
- Show 'Role required' placeholder and disable dropdown when role is missing
@JoaquinBN JoaquinBN merged commit 7d50aea into dev Jan 9, 2026
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.

1 participant