Update role assignment for /users listing silo users without names #981
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
oxidecomputer/omicron#1261 changes
/users
so it lists silo users instead of system users, which is what we need. The problem is those users have no names (yet). So for now instead of doing the manual association of users to names I had been doing for system users, now we just drop''
in there as a placeholder and do everything by UUID. We will have names eventually.Testing against real Nexus
This change also allowed me to test that role assignment actually behaves the way you would think. Nexus by default starts out with a "privileged" user who has admin on everything and an "unprivileged" user who can't see anything. I tested the following and everything works as expected:
P
creates org and projectUP
can't list orgs in silo, can't fetch individual org or projectP
addsUP
as viewer of orgUP
still can't list orgs (this is a list children perm on the silo) but can now fetch the org directly and list projects, still can't create a project in the orgP
changesUP
to collaborator on orgUP
can now create a project in the org