-
Notifications
You must be signed in to change notification settings - Fork 887
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a202178
to
fb4f80f
Compare
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.
FE ✅
-- 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 doing id 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 <[email protected]>
What this does
Admin
->template-admin
anduser-admin
First user ->
owner