- Notifications
You must be signed in to change notification settings - Fork928
chore: Rename 'admin' to 'owner'#3498
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
a202178
tofb4f80f
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
FE ✅
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-- Update the first user with the role 'admin'. This should be the first | ||
-- user ever, but if that user was demoted from an admin, then choose | ||
-- the next best user. | ||
id = (SELECT id FROM users WHERE 'admin' = ANY(rbac_roles) ORDER BY created_at ASC LIMIT 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This could technically cause the query to fail if no rows are found, I think doingid IN (...)
would allow it to match no rows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Oh interesting. Let me try it out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@coadler It does not seem to matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hmm, I thought this would've caused an issue when you compared a non-null field to null. Sounds good then!
Co-authored-by: Colin Adler <colin1adler@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
What this does
Admin
->template-admin
anduser-admin
First user ->
owner