Remove the add block button for permissions

Hi,
is there a possibility to remove the adding new blocks to a page without loosing the blocks on the page?
I need this for a editor blueprint where the editor should only have permissions to change the content of some blocks.

My solution actually is to use a custom panel css:

[data-user="XYZ"] .k-fieldset .k-field-add-item-button,
[data-user="XYZ"] .k-fieldset .k-button {
    display: none;
}

is naturally not really stable :slight_smile: .

Hey,

haven’t tried it, but what about the disabled property: Blocks | Kirby CMS

Greetings

That would disable the field, so it can no longer be edited, which is not what @JanStieler is after.

Maybe it’s time to reopen Permissions issue in the pages section "Add" button · Issue #3828 · getkirby/kirby · GitHub ?

Well, this is about the blocks field, not pages sections, and we never had field specific permissions.

Right. I read too fast :see_no_evil:

Still, I’ld love the issue to be picked up again for pages :stuck_out_tongue_winking_eye:

How about the ‘data-role’ attribute? So maybe
.k-panel:not([data-role="admin"]):not([data-role="editor"])
Might be more ‘stable’?

Hi @duncanmunro,
I meant more that css is not stable because the function exist further and is only hidden and not disabled.