public static void checkOperationPermission(Long createUserId) {
        LoginUser loginUser = ContextUtils.getLoginUser();
        // Representative is desktop mode
        if (RoleCodeEnum.DESKTOP.getDefaultUserId().equals(loginUser.getId())) {
            if (RoleCodeEnum.DESKTOP.getDefaultUserId().equals(createUserId)) {
                return;
            } else {
                throw new PermissionDeniedBusinessException();
            }
        }
        // Administrators can edit anything
        if (loginUser.getAdmin()) {
            return;
        }
        // Not that administrators can only edit their own things
        if (!loginUser.getId().equals(createUserId)) {
            throw new PermissionDeniedBusinessException();
        }
    }
Verify whether the currently logged-in user has permission to operate on the current content

@param createUserId The creator of the current content
chat2db-server/chat2db-server-domain/chat2db-server-domain-core/src/main/java/ai/chat2db/server/domain/core/util/PermissionUtils.java