Skip to content

Add UI hiding features for role requests, expiring roles, and ownership selection #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jonathanhle
Copy link
Contributor

Hi!,

We don't use Role Requests at all, and our group ownership is handled through YAML configs that sync with the DB via plugins. The manual UI controls for these features are creating user support noise - people see buttons they shouldn't use and ask us about them/click them & generate unneeded notification pings/support tickets.

This PR adds config flags to hide UI elements that organizations might not need:

  • Role Requests navigation section
  • Group/role ownership buttons
  • Edit buttons for groups and roles
  • Various group management controls

Everything defaults to current behavior (no breaking changes). Just gives orgs a way to streamline the interface to match their actual workflows.

This would let organizations hide the parts they don't use and reduce user confusion.

All the backend functionality stays intact - this is purely frontend conditional rendering based on config flags. Added docs and examples following the existing config pattern.

This is me trying not to have to manage a fork again, but I realize some of this might be weird for upstream.

Let me know what you think.

-Jonathan

@jonathanhle jonathanhle marked this pull request as ready for review June 5, 2025 06:44
@Copilot Copilot AI review requested due to automatic review settings June 5, 2025 06:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces configuration flags to conditionally hide certain UI elements that are unnecessary for many organizations, minimizing user confusion and support noise. Key changes include conditional rendering of buttons and navigation items, updates to access configuration, and documentation updates to reflect the new flags.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/pages/requests/Create.tsx Adjusts default form values and conditionally renders ownership UI.
src/pages/groups/Read.tsx Wraps edit and management buttons with config flag checks.
src/config/accessConfig.ts Adds new flags to manage UI visibility.
src/components/NavItems.tsx Introduces conditional rendering for navigation items.
config/config.default.json Updates default configuration with new UI hiding options.
README.md Documents new configuration flags for UI hiding.
Comments suppressed due to low confidence (1)

src/pages/groups/Read.tsx:268

  • [nitpick] Consider extracting this complex conditional into a well-named variable for easier understanding and future maintenance.
((group.type !== 'role_group' && !accessConfig.HIDE_GROUP_EDIT_BTN) || (group.type === 'role_group' && !accessConfig.HIDE_ROLE_EDIT_BTN)) && (

@jonathanhle
Copy link
Contributor Author

Whomp. Thanks for checking.

@somethingnew2-0
Copy link
Collaborator

Re-opening as we haven't gotten around to checking out this PR yet, thanks for submitting it!

@jonathanhle
Copy link
Contributor Author

Got some help with Access this week, but new help decided to move the project internal for a bit. Will try to figure out how to undiverge later. Can leave this PR open if anything interesting to anyone, but not sure what will happen if it's tries to merge.

@jonathanhle jonathanhle closed this Jul 8, 2025
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.

2 participants