File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public RoleFactory(RoleManager<IdentityRole> roleManager)
2727 /// <returns></returns>
2828 public virtual async Task < IdentityRole > Administrator ( )
2929 {
30- return await CreateRoleIfNotExists ( AuthenticationDefaults . CustomerRole ) ;
30+ return await CreateRoleIfNotExists ( AuthenticationDefaults . AdministratorRole ) ;
3131 }
3232
3333 /// <summary>
@@ -50,7 +50,8 @@ protected virtual async Task<IdentityRole> CreateRoleIfNotExists(string roleName
5050 var role = await _roleManager . FindByNameAsync ( roleName ) ;
5151 if ( role == null )
5252 {
53- return new IdentityRole ( roleName ) ;
53+ role = new IdentityRole ( roleName ) ;
54+ await _roleManager . CreateAsync ( role ) ;
5455 }
5556
5657 return role ;
Original file line number Diff line number Diff line change 1515 <GenerateAssemblyConfigurationAttribute >false</GenerateAssemblyConfigurationAttribute >
1616 <GenerateAssemblyCompanyAttribute >false</GenerateAssemblyCompanyAttribute >
1717 <GenerateAssemblyProductAttribute >false</GenerateAssemblyProductAttribute >
18- <Version >1.0.0-rc6 </Version >
18+ <Version >1.0.0-rc7 </Version >
1919 <PackageReleaseNotes ></PackageReleaseNotes >
2020 <Description >Wilcommerce Authentication and Authorization library</Description >
2121 </PropertyGroup >
You can’t perform that action at this time.
0 commit comments