Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
Emyrk merged 11 commits intomainfromstevenmasley/2135/roles_mig
Aug 15, 2022
Merged

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedAug 12, 2022
edited
Loading

What this does

Admin ->template-admin and user-admin
First user ->owner

Screenshot from 2022-08-12 16-26-23

@EmyrkEmyrk marked this pull request as draftAugust 12, 2022 21:30
@EmyrkEmyrkforce-pushed thestevenmasley/2135/roles_mig branch froma202178 tofb4f80fCompareAugust 12, 2022 22:29
@EmyrkEmyrk marked this pull request as ready for reviewAugust 15, 2022 15:24
@EmyrkEmyrk requested review fromammario anda team ascode ownersAugust 15, 2022 15:24
Copy link
Member

@Kira-PilotKira-Pilot left a 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);
Copy link
Contributor

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.

Copy link
MemberAuthor

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

Copy link
MemberAuthor

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.

Copy link
Contributor

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>
@EmyrkEmyrk merged commit01dd35f intomainAug 15, 2022
@EmyrkEmyrk deleted the stevenmasley/2135/roles_mig branchAugust 15, 2022 19:40
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@coadlercoadlercoadler approved these changes

@Kira-PilotKira-PilotKira-Pilot approved these changes

@ammarioammarioAwaiting requested review from ammario

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@Emyrk@johnstcn@coadler@Kira-Pilot

[8]ページ先頭

©2009-2025 Movatter.jp