Use GetRole in the user login state generator, fail if not found.#36314
Use GetRole in the user login state generator, fail if not found.#36314
Conversation
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
23a6bf8 to
dce4667
Compare
|
Some further discussion in slack, since I noticed this broke This PR does fix the issue for me, though I do wonder if we're doing something incorrect while creating bot users/roles that leads to them not getting inserted properly into the cache. It's also interesting that this doesn't affect |
The user login state generator will use GetRole instead of GetRoles to lookup roles. GetRole has a more robust fallback when unable to find things in the cache, so using it directly will make the user login state generator more robust in general. Additionally, the user login state generator should not allow missing roles, so if a role is missing it will now throw an error.
dce4667 to
f1cc08e
Compare
The user login state generator will use GetRole instead of GetRoles to lookup roles. GetRole has a more robust fallback when unable to find things in the cache, so using it directly will make the user login state generator more robust in general.
Additionally, the user login state generator should not allow missing roles, so if a role is missing it will now throw an error.