Added roles (may or may not be used)

This commit is contained in:
Veljko Tosic
2026-02-12 20:25:51 +01:00
parent 86f66727f3
commit 5ecf8435f4
5 changed files with 71 additions and 3 deletions

View File

@@ -65,8 +65,7 @@ public class UserRepository : AbstractRepository<Domain.Models.User.User, UserId
throw new Exception($"User registration failed: {errors}");
}
//Realno nebitno, ali postoji infrastruktura ako treba da se koristi kasnije
//await _userManager.AddToRoleAsync(entity, "User");
await _userManager.AddToRoleAsync(entity, UserRole.User.Name);
}
public async Task<LoginResult> LoginWithEmailAndPasswordAsync(string email, string password, CancellationToken cancellationToken = default)