Admin message

Due to spam, we had to disable registrations and GitHub login. Please reach out to us at support@greenhost.net if you want to contribute.

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 Feb 15, 2023 by Arie Peterson
Assignee Loading
Time tracking Loading