浏览代码

update AccountRegistryServiceImpl#createAdminAccount

reghao 2 周之前
父节点
当前提交
a80071f851

+ 1 - 1
auth/auth-service/src/main/java/cn/reghao/tnb/auth/app/service/impl/AccountRegistryServiceImpl.java

@@ -114,7 +114,7 @@ public class AccountRegistryServiceImpl implements AccountRegistryService {
             String password = ConstantId.ADMIN_PASSWORD;
             String salt = RandomString.getSalt(64);
             String encodedPassword = passwordEncoder.encode(password + salt);
-            Set<UserAuthority> authorities = Set.of(new UserAuthority(AccountRole.ROLE_TNB_ADMIN.getValue()));
+            Set<UserAuthority> authorities = Set.of(new UserAuthority(AccountRole.ROLE_TNB_ADMIN.name()));
 
             UserAccount userAccount = new UserAccount(principal, userId, encodedPassword, salt, authorities);
             accountRepository.saveAccount(userAccount);