Protect editor from multiple users editing simultaniously

This has been discussed from different angles, but as a minimum feature it would be great if BB would alert you when opening a page that is currently being edited by another user.

The alert could present a few options, to Exit, Take Over, and maybe “View Only” if that was easy to implenent.

Thanks Thomas and BB team!

you can try this, add to function.php
but the flow , 1. edit using default button on wordpress, then edit with bricks builder

//=====
add_action('template_redirect', function () {

    error_log('--- BRICKS LOCK CHECK START ---');

    // 1. Cek Bricks editor
    if (!function_exists('bricks_is_builder')) {
        error_log('Bricks function NOT found');
        return;
    }

    if (!bricks_is_builder()) {
        error_log('Not Bricks builder context');
        return;
    }

    error_log('Bricks builder detected');

    // 2. Ambil post ID
    $post_id = get_the_ID();
    error_log('Post ID: ' . print_r($post_id, true));

    if (!$post_id) {
        error_log('Post ID EMPTY');
        return;
    }

    // 3. Ambil post lock
    $lock = get_post_meta($post_id, '_edit_lock', true);
    error_log('Raw _edit_lock meta: ' . print_r($lock, true));

    if ($lock) {
        [$time, $user_id] = array_pad(explode(':', $lock), 2, null);
        $user_id = (int) $user_id;

        error_log('Lock owner user_id: ' . $user_id);
        error_log('Current user_id: ' . get_current_user_id());

        // 4. Jika dikunci user lain → BLOCK
        if ($user_id && $user_id !== get_current_user_id()) {

            $user = get_userdata($user_id);
            error_log('BLOCKING editor, locked by: ' . $user->display_name);

            wp_die(
                '<h2>â›” Editor Terkunci</h2>
                <p>Halaman ini sedang diedit oleh <strong>' .
                esc_html($user->display_name) .
                '</strong>.</p>',
                'Editor Terkunci',
                ['response' => 403]
            );
        }
    } else {
        error_log('No lock found, editor allowed');
    }

    // 5. Set lock untuk user ini
    update_post_meta(
        $post_id,
        '_edit_lock',
        time() . ':' . get_current_user_id()
    );

    error_log('Lock SET for current user');
    error_log('--- BRICKS LOCK CHECK END ---');

});