Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 712fe6f

Browse files
committed
detailed error message for admin
# Conflicts: # src/Backend/Jp.UserManagement/Configuration/ConfigurePolicy.cs # src/Frontend/Jp.UI.SSO/Views/Home/Index.cshtml
1 parent 9e84e9a commit 712fe6f

6 files changed

Lines changed: 43 additions & 35 deletions

File tree

src/Backend/Jp.UserManagement/Configuration/ConfigurePolicy.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using IdentityServer4.Extensions;
2+
using Microsoft.AspNetCore.Authorization;
23
using Microsoft.Extensions.DependencyInjection;
34

45
namespace Jp.Management.Configuration
@@ -9,16 +10,16 @@ public static void AddPolicies(this IServiceCollection services)
910
{
1011
services.AddAuthorization(options =>
1112
{
12-
options.AddPolicy("Admin",
13-
policy => policy.RequireAssertion(c =>
14-
c.User.HasClaim("is4-rights", "manager") ||
15-
c.User.IsInRole("Administrador")));
13+
options.AddPolicy("Admin",
14+
policy => policy.RequireAssertion(c =>
15+
c.User.HasClaim("is4-rights", "manager") ||
16+
c.User.IsInRole("Administrator")));
1617

1718
options.AddPolicy("ReadOnly", policy =>
18-
policy.RequireAssertion(c =>
19-
c.User.IsAuthenticated() ||
20-
c.User.HasClaim("is4-rights", "manager") ||
21-
c.User.IsInRole("Administrador")));
19+
policy.RequireAssertion(c =>
20+
c.User.IsAuthenticated() ||
21+
c.User.HasClaim("is4-rights", "manager") ||
22+
c.User.IsInRole("Administrator")));
2223

2324
options.AddPolicy("UserManagement", policy =>
2425
policy.RequireAuthenticatedUser());

src/Backend/Jp.UserManagement/jpProject_sso_log.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28043,7 +28043,7 @@ WHERE `userrole`.`RoleId` = @__role_Id_0
2804328043
2018-10-10 10:14:14.630 -03:00 [INF] Successfully validated the token.
2804428044
2018-10-10 10:14:14.633 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
2804528045
2018-10-10 10:14:14.643 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
28046-
2018-10-10 10:14:14.648 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
28046+
2018-10-10 10:14:14.648 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
2804728047
2018-10-10 10:14:14.657 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
2804828048
2018-10-10 10:14:14.670 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
2804928049
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -29545,7 +29545,7 @@ FROM `Roles` AS `r`
2954529545
2018-10-10 12:23:15.180 -03:00 [INF] Successfully validated the token.
2954629546
2018-10-10 12:23:15.184 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
2954729547
2018-10-10 12:23:15.190 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
29548-
2018-10-10 12:23:15.195 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
29548+
2018-10-10 12:23:15.195 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
2954929549
2018-10-10 12:23:15.201 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
2955029550
2018-10-10 12:23:15.214 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
2955129551
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -43525,7 +43525,7 @@ FROM `Roles` AS `r`
4352543525
2018-10-12 11:32:10.866 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
4352643526
2018-10-12 11:32:10.872 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
4352743527
2018-10-12 11:32:10.876 -03:00 [INF] Authorization was successful.
43528-
2018-10-12 11:32:10.879 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
43528+
2018-10-12 11:32:10.879 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
4352943529
2018-10-12 11:32:10.886 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
4353043530
2018-10-12 11:32:10.898 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
4353143531
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -43579,7 +43579,7 @@ FROM `Roles` AS `r`
4357943579
2018-10-12 11:33:25.653 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
4358043580
2018-10-12 11:33:25.657 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
4358143581
2018-10-12 11:33:25.661 -03:00 [INF] Authorization was successful.
43582-
2018-10-12 11:33:25.665 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
43582+
2018-10-12 11:33:25.665 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
4358343583
2018-10-12 11:33:25.669 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
4358443584
2018-10-12 11:33:25.682 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
4358543585
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -45310,7 +45310,7 @@ WHERE `userrole`.`RoleId` = @__role_Id_0
4531045310
2018-10-12 12:13:21.268 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
4531145311
2018-10-12 12:13:21.272 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
4531245312
2018-10-12 12:13:21.277 -03:00 [INF] Authorization was successful.
45313-
2018-10-12 12:13:21.281 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
45313+
2018-10-12 12:13:21.281 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
4531445314
2018-10-12 12:13:21.287 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
4531545315
2018-10-12 12:13:21.301 -03:00 [INF] Executed DbCommand (2ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
4531645316
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -45345,7 +45345,7 @@ FROM `Roles` AS `r`
4534545345
2018-10-12 12:13:25.392 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
4534645346
2018-10-12 12:13:25.397 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
4534745347
2018-10-12 12:13:25.404 -03:00 [INF] Authorization was successful.
45348-
2018-10-12 12:13:25.408 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
45348+
2018-10-12 12:13:25.408 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
4534945349
2018-10-12 12:13:25.413 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
4535045350
2018-10-12 12:13:25.422 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
4535145351
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -46373,7 +46373,7 @@ FROM `Roles` AS `r`
4637346373
2018-10-12 12:27:27.399 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
4637446374
2018-10-12 12:27:27.402 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
4637546375
2018-10-12 12:27:27.406 -03:00 [INF] Authorization was successful.
46376-
2018-10-12 12:27:27.409 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
46376+
2018-10-12 12:27:27.409 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
4637746377
2018-10-12 12:27:27.413 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
4637846378
2018-10-12 12:27:27.425 -03:00 [INF] Executed DbCommand (3ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
4637946379
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -46405,7 +46405,7 @@ FROM `Roles` AS `r`
4640546405
2018-10-12 12:27:29.563 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
4640646406
2018-10-12 12:27:29.567 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
4640746407
2018-10-12 12:27:29.573 -03:00 [INF] Authorization was successful.
46408-
2018-10-12 12:27:29.578 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
46408+
2018-10-12 12:27:29.578 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
4640946409
2018-10-12 12:27:29.584 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
4641046410
2018-10-12 12:27:29.595 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
4641146411
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -48282,7 +48282,7 @@ WHERE `userrole`.`RoleId` = @__role_Id_0
4828248282
2018-10-13 00:47:04.652 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
4828348283
2018-10-13 00:47:04.659 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
4828448284
2018-10-13 00:47:04.665 -03:00 [INF] Authorization was successful.
48285-
2018-10-13 00:47:04.670 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
48285+
2018-10-13 00:47:04.670 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
4828648286
2018-10-13 00:47:04.678 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
4828748287
2018-10-13 00:47:04.692 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
4828848288
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -48505,7 +48505,7 @@ WHERE `userrole`.`RoleId` = @__role_Id_0
4850548505
2018-10-13 00:47:44.831 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
4850648506
2018-10-13 00:47:44.835 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
4850748507
2018-10-13 00:47:44.840 -03:00 [INF] Authorization was successful.
48508-
2018-10-13 00:47:44.844 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
48508+
2018-10-13 00:47:44.844 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
4850948509
2018-10-13 00:47:44.850 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
4851048510
2018-10-13 00:47:44.863 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
4851148511
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -56113,7 +56113,7 @@ WHERE `userrole`.`RoleId` = @__role_Id_0
5611356113
2018-10-13 03:44:50.956 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
5611456114
2018-10-13 03:44:50.963 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
5611556115
2018-10-13 03:44:50.973 -03:00 [INF] Authorization was successful.
56116-
2018-10-13 03:44:50.981 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
56116+
2018-10-13 03:44:50.981 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
5611756117
2018-10-13 03:44:50.992 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
5611856118
2018-10-13 03:44:51.009 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
5611956119
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`
@@ -57196,7 +57196,7 @@ WHERE `userrole`.`RoleId` = @__role_Id_0
5719657196
2018-10-13 10:10:13.462 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
5719757197
2018-10-13 10:10:13.469 -03:00 [INF] Route matched with {action = "Details", controller = "Roles"}. Executing action Jp.Management.Controllers.RolesController.Details (Jp.Management)
5719857198
2018-10-13 10:10:13.475 -03:00 [INF] Authorization was successful.
57199-
2018-10-13 10:10:13.479 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrador"]) - Validation state: "Valid"
57199+
2018-10-13 10:10:13.479 -03:00 [INF] Executing action method Jp.Management.Controllers.RolesController.Details (Jp.Management) with arguments (["Administrator"]) - Validation state: "Valid"
5720057200
2018-10-13 10:10:13.487 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Pomelo.EntityFrameworkCore.MySql' with options: MigrationsAssembly=Jp.Infra.Migrations.MySql.Identity
5720157201
2018-10-13 10:10:13.501 -03:00 [INF] Executed DbCommand (1ms) [Parameters=[@__name_0='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30']
5720257202
SELECT `f`.`Id`, `f`.`ConcurrencyStamp`, `f`.`Name`, `f`.`NormalizedName`

src/Frontend/Jp.UI.SSO/Controllers/Home/ErrorViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ namespace Jp.UI.SSO.Controllers.Home
99
public class ErrorViewModel
1010
{
1111
public ErrorMessage Error { get; set; }
12+
public string ErrorMessage { get; set; }
13+
public string ErrorDescription { get; set; }
14+
public string RequestId { get; set; }
1215
}
1316
}

src/Frontend/Jp.UI.SSO/Controllers/Home/HomeController.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using IdentityServer4.Models;
22
using IdentityServer4.Services;
3+
using Microsoft.AspNetCore.Hosting;
34
using Microsoft.AspNetCore.Http;
45
using Microsoft.AspNetCore.Localization;
56
using Microsoft.AspNetCore.Mvc;
@@ -10,10 +11,12 @@ namespace Jp.UI.SSO.Controllers.Home
1011
public class HomeController : Controller
1112
{
1213
private readonly IIdentityServerInteractionService _interaction;
14+
private readonly IHostingEnvironment _hostingEnvironment;
1315

14-
public HomeController(IIdentityServerInteractionService interaction)
16+
public HomeController(IIdentityServerInteractionService interaction, IHostingEnvironment hostingEnvironment)
1517
{
1618
_interaction = interaction;
19+
_hostingEnvironment = hostingEnvironment;
1720
}
1821

1922
[ResponseCache(Location = ResponseCacheLocation.Client, NoStore = true)]
@@ -34,6 +37,9 @@ public async Task<IActionResult> Error(string errorId)
3437
if (message != null)
3538
{
3639
vm.Error = message;
40+
vm.ErrorMessage = vm?.Error?.Error;
41+
vm.ErrorDescription = User.IsInRole("Administrator") || _hostingEnvironment.IsDevelopment() ? vm?.Error?.ErrorDescription : null;
42+
vm.RequestId = vm?.Error?.RequestId;
3743
}
3844

3945
return View("Error", vm);
@@ -49,6 +55,9 @@ public IActionResult LoginError(string error)
4955
if (error != null)
5056
{
5157
vm.Error = new ErrorMessage() { ErrorDescription = error, Error = "1000" };
58+
vm.ErrorMessage = vm?.Error?.Error;
59+
vm.ErrorDescription = User.IsInRole("Administrator") ? vm?.Error?.ErrorDescription : null;
60+
vm.RequestId = vm?.Error?.RequestId;
5261
}
5362

5463
return View("Error", vm);

src/Frontend/Jp.UI.SSO/Util/DbMigrationHelpers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ private static async Task EnsureSeedIdentityData(
6060
{
6161

6262
// Create admin role
63-
if (!await roleManager.RoleExistsAsync("Administrador"))
63+
if (!await roleManager.RoleExistsAsync("Administrator"))
6464
{
65-
var role = new UserIdentityRole { Name = "Administrador" };
65+
var role = new UserIdentityRole { Name = "Administrator" };
6666

6767
await roleManager.CreateAsync(role);
6868
}
@@ -85,7 +85,7 @@ private static async Task EnsureSeedIdentityData(
8585
await userManager.AddClaimAsync(user, new Claim("is4-rights", "manager"));
8686
await userManager.AddClaimAsync(user, new Claim("username", Users.GetUser(configuration)));
8787
await userManager.AddClaimAsync(user, new Claim("email", Users.GetEmail(configuration)));
88-
await userManager.AddToRoleAsync(user, "Administrador");
88+
await userManager.AddToRoleAsync(user, "Administrator");
8989
}
9090
}
9191

0 commit comments

Comments
 (0)