Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Administrator label in /settings/users #2594

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

mhespenh
Copy link
Contributor

@mhespenh mhespenh commented Mar 12, 2024

Headline

Fix the admin label on <UsersTable /> within /settings/users

Details

In src/app/(main)/settings/users/UsersTable.tsx:25 it expects to find a role ROLES['admin'] based on the role name in the database, which doesn't exist. Everywhere else in the codebase it seems to use ROLES.administrator.

This is the easiest/most backwards compatible way I could think of to fix this, without requiring a migration to update the users' role fields in the database.

Before:
image

After:
image

I haven't worked with this translation lib before, so hopefully I updated things correctly- please check my work and let me know if there is a different/better way to do this with react-intl

Copy link

vercel bot commented Mar 12, 2024

@mhespenh is attempting to deploy a commit to the umami-software Team on Vercel.

A member of the Team first needs to authorize it.

@mhespenh mhespenh changed the title fix: Administrator label in users table fix: Administrator label in users table UI Mar 12, 2024
@mhespenh mhespenh changed the title fix: Administrator label in users table UI fix: Administrator label in /settings/users Mar 12, 2024
Copy link
Collaborator

@mikecao mikecao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mikecao mikecao changed the base branch from master to dev March 22, 2024 19:33
@mikecao mikecao changed the base branch from dev to master March 22, 2024 19:34
@mikecao mikecao merged commit 3656234 into umami-software:master Mar 22, 2024
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants