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

Refactor migrate user role to multi role system #8

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

Merged
fulleni merged 8 commits into main from refactor_migrate_user_role_to_multi_role_system
Jul 5, 2025
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(api): update auth routes to use roles list for guest check
  • Loading branch information
fulleni committed Jul 5, 2025
commit 6a85feea3185adeda375d01436ab4e7a54e3f6f6
2 changes: 1 addition & 1 deletion routes/api/v1/auth/link-email.dart
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Future<Response> onRequest(RequestContext context) async {
// This should ideally be caught by `authenticationProvider` if route is protected
throw const UnauthorizedException('Authentication required to link email.');
}
if (authenticatedUser.role != UserRole.guestUser) {
if (!authenticatedUser.roles.contains(UserRoles.guestUser)) {
throw const BadRequestException(
'Account is already permanent. Cannot initiate email linking.',
);
Expand Down

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /