React check for admin access breaks sometimes
We have a lingering assumption that the dashboard is the app that comes first in the list of app roles, which can break down if you provision from the start with custom apps that can get a lower ID than the dashboard.
In UserModal
:
const dashboardRole = useWatch({
control,
name: 'app_roles.0.role',
});
This needs to be replaced by something more intelligent.
The effect of this is that admin users can be shown as non-admin, so with an explicit list of app access choices, and vice versa.
Edited by Arie Peterson