public static boolean checkBaseQueryPermission(Long createUserId) {
        LoginUser loginUser = ContextUtils.getLoginUser();
        // Representative is desktop mode
        if (RoleCodeEnum.DESKTOP.getDefaultUserId().equals(loginUser.getId())) {
            if (RoleCodeEnum.DESKTOP.getDefaultUserId().equals(createUserId)) {
                return true;
            } else {
                throw new PermissionDeniedBusinessException();
            }
        }
        // Administrators can edit anything
        return loginUser.getAdmin();
    }
Verify whether you have query permission

@param createUserId
@return
chat2db-server/chat2db-server-domain/chat2db-server-domain-core/src/main/java/ai/chat2db/server/domain/core/util/PermissionUtils.java