Open stevenGravy opened 2 months ago
This error has popped up (and been solved) before and I thought it was checked for in the unified resources page. I'll double check.
However, I think it's just a spaghetti mess trying to solve the actual problem.
The current state of access requests with search_as_roles is that the api request gets extended by your search_as_roles rather than swapping your roles completely. As far as I'm aware, it's been this way forever.
I think it creates a lot of confusion, especially now that we include multiple states in the unified resources view.
I'll bring it up with the UX team this week and see if maybe we can add an "exclusive search_as_roles" state. I think it makes sense in the context of unified resources view now.
Expected behavior:
The access request resources search would not return resources that do not match
search_as_roles
for a user's roles.Current behavior:
Users see all resources they have access to in the Access Request resource view, not just searchable ones. This makes it difficult to search for the request specific items since all resources are showing.
For example a user has two roles. One with just access to a set of resources with
env: dev
and another role withsearch_as_roles
that match toenv: prod
. Bothenv: dev
andenv: prod
nodes will show in a new resources request search. If the user attempts to submit an access request they will get an error like below since it's invalid.Bug details:
Recreation steps
env: dev
labeled and anotherenv: prod
dev-access
that has just ssh access toenv: dev
nodesprod-access
that has just ssh access toenv: prod
nodesrequester-access
that allows requesting the prod roledev-access
andrequester-access