public static String generateRandomCode(int length) {
            StringBuilder sb = new StringBuilder(length);
            for (int i = 0; i < length; i++) {
                sb.append(CHARACTERS.charAt(RANDOM.nextInt(CHARACTERS.length())));
            }
            return sb.toString();
        }
Save the current user identity (administrator or normal user) and user ID to the context and database session for subsequent use.

@param isAdmin
@param userId
chat2db-server/chat2db-server-start/src/test/java/ai/chat2db/server/start/test/core/ConfigServiceTest.java