feat: 默认角色修改为defalut角色

This commit is contained in:
陈淳
2023-12-22 17:37:22 +08:00
parent f6fcf7b1b2
commit 906409921f
3 changed files with 5 additions and 5 deletions

View File

@@ -293,7 +293,7 @@ namespace Yi.Framework.Rbac.Application.Services
var entity = await _userRepository.InsertReturnEntityAsync(newUser);
//赋上一个初始角色
var role = await _roleRepository.GetFirstAsync(x => x.RoleCode == UserConst.GuestRoleCode);
var role = await _roleRepository.GetFirstAsync(x => x.RoleCode == UserConst.DefaultRoleCode);
if (role is not null)
{
await _userManager.GiveUserSetRoleAsync(new List<Guid> { entity.Id }, new List<Guid> { role.Id });