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: refactor user -> rbac.subject into a function#13624

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 5 commits intomainfromstevenmasley/assert_not_exists_role
Jun 21, 2024

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJun 21, 2024
edited
Loading

db.GetAuthorizationUserRoles was being called in multiple places. Moved the logic tohttpmw.UserRBACSubject for now. This logic handles custom roles.

Added unit tests for logging in with custom roles, and roles that no longer exist. Since the db schema does not assert the[]text in postgres actually exist in thecustom_roles table.

What this does

There was a bug with password login and custom roles because the duplicated logic did not handle custom-roles.

@EmyrkEmyrk changed the titletest: implement test to assert deleted custom roles are omittedchore: refactor user -> rbac.subject into a functionJun 21, 2024
@EmyrkEmyrk marked this pull request as ready for reviewJune 21, 2024 15:01
@EmyrkEmyrk requested a review fromf0sselJune 21, 2024 15:02
Copy link
Contributor

@f0sself0ssel left a comment
edited
Loading

Choose a reason for hiding this comment

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

Yeah this this will help encapsulate this while all these changes are being made

Emyrk reacted with thumbs up emoji
@EmyrkEmyrk merged commit0e933f0 intomainJun 21, 2024
36 checks passed
@EmyrkEmyrk deleted the stevenmasley/assert_not_exists_role branchJune 21, 2024 16:30
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 21, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@f0sself0sself0ssel approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Emyrk@f0ssel

[8]ページ先頭

©2009-2025 Movatter.jp