Skip to content
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

Restrict client selection when d-admins assign roles #1655

Closed
4 tasks
craigyu opened this issue Nov 18, 2024 · 0 comments · Fixed by #1701
Closed
4 tasks

Restrict client selection when d-admins assign roles #1655

craigyu opened this issue Nov 18, 2024 · 0 comments · Fixed by #1701

Comments

@craigyu
Copy link
Collaborator

craigyu commented Nov 18, 2024

Description

Currently, when a delegated admin navigates to the "Add User Permission" screen, they can select any forest client if the role is an abstract role. However, when a delegated admin role is created, they are assigned both a role and the organization (Forest Client) under which they can assign this role.

For example, if user Bob is granted a delegated admin role with the following properties under app ABC:

  • Role: Submitter
  • Forest Clients: 123 and 456

This means Bob can only assign the Submitter role to other users for forest clients 123 and 456. He cannot assign the Submitter role to a user for forest client 789.

To address this, we need to limit the selection of forest clients for delegated admins based on their assigned properties. The design for this selection component is still in progress at the time of writing, but it will either be a multi-select dropdown or a table with radio buttons.

Acceptance Criteria

  • Create a new component, ForestClientSelect, that accepts a prop with an array of valid forest clients.
  • Integrate this component with frontend/src/views/AddAppPermission. The AddAppPermission view should act as the parent, and the new component should be its child. This component should be used if and only if the user is a delegated admin and not an app admin for a given app.
  • Ensure validation functionality works as expected.
  • Changes made in this component should update the forestClients: FamForestClientSchema[] inside the formData.

Additional Information

This task should ideally be completed after issue #1654.

F i g m a Link

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

Successfully merging a pull request may close this issue.

2 participants