Преглед на файлове

update AccountRegistryServiceImpl#createAdminAccount

reghao преди 2 седмици
родител
ревизия
a80071f851
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      auth/auth-service/src/main/java/cn/reghao/tnb/auth/app/service/impl/AccountRegistryServiceImpl.java

+ 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);