<p>Without using singles, you'll need to write a module to add this functionality.</p>
<p>I'd recommend adding a new field to the section called &quot;User Allow List&quot; (or &quot;Deny List&quot; you can go either way with this).</p>
<p>Add an on-event function that checks the users in this field and sends a 403 if the current user does not match.</p>
<p>Add an on-save function for entries in this section that auto-populates your default list of Users. Now that I've typed this far.... best to do this by User Group and not individual Users. Have the field be a dropdown and not a User selection field, have the values match the ID or slug of the user group and check against that group.</p>
<p>Then you can add/remove users from that access list to manage it.</p>
<p>(you could also browse the plugin marketplace, I havent looked but maybe someone has published something like this already)</p>

CC BY-SA 4.0
2023-09-25T11:59:45.380Z
Ok, thx for you comment, Cherry!

This'll be my challenge to write my first module ... but you gave me a concept at least. :)
Marc 
CC BY-SA 4.0
2023-09-27T04:15:43.187Z
Best of luck! You'll feel great once you do one ^_^
cherrykoda
CC BY-SA 4.0
2023-09-22T18:34:26.720Z
2023-09-22T18:34:26.720Z
cherrykoda
<p>Just use a single for that entry. When you add a new single, existing users have no access by default.</p>
<p>Additionally, if your page must live within a structure, you can create a new page type (e.g. 'Linked entry') with a field that can select only one entry from 'singles'. In the template for your new page type takes the input from that field and use it to create a <a href="https://craftcms.com/docs/4.x/dev/tags.html#redirect" rel="nofollow noreferrer">redirect</a> to your single; which editors do not have permission to edit/delete.</p>
<p>Something like this:</p>
<p><a href="https://i.sstatic.net/bmhjf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bmhjf.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-09-12T14:22:22.580Z
Thanks for your input, Seth!

But that's not working: In my case, it's a subentry inside a structure ... concrete a specific subpage of the sitemap.

But I want to be sure, that this subpage will not be deleted by mistake by any editor.
Marc 
CC BY-SA 4.0
2023-09-12T16:32:32.717Z
Does it really have to be in a structure though? You could set up the single URL to appear as though it belonged in the structure; and was included in the site map accordingly. E.g: /about/press-releases/not-really-a-press-release could just be a single; an uneditable one-off
Seth Warburton
CC BY-SA 4.0
2023-09-14T07:55:05.797Z
Yes ... because the editors are free to add / edit / remove subpages of this entry. I just want to protect this parent entry, because this entry id and position in the pagetree is important. It's a kind of "folder" ... not a page.
Marc 
CC BY-SA 4.0
2023-09-14T07:57:18.890Z
The concept to remove functionality in control panel with css / js is not too bad ... but it still is a dirty workaround and I'm missing a state of the art concept for this usecase in Craft.
Marc 
CC BY-SA 4.0
2023-09-12T13:01:50.270Z
2023-09-14T11:32:48.707Z
2023-09-14T11:32:48.707Z
Seth Warburton
<p>I'm searching for an idea, to protect a single entry from being edited / deleted by editors (CP / backend).
Of course, it's easy to do for fields or sections, but for a single entry ... hmmm ...</p>
<ul>
<li><a href="https://plugins.craftcms.com/isolate?craft4" rel="nofollow noreferrer">https://plugins.craftcms.com/isolate?craft4</a> -&gt; that's not fitting to my needs</li>
<li>a concept could be, to manipulate the CP with CSS / JS -&gt; looks like a dirty hack</li>
<li>maybe a custom plugin is needed -&gt; a problem for me, unfortunalety</li>
</ul>
<p>Any ideas? :)</p>

CC BY-SA 4.0
2023-09-12T07:01:21.697Z
Making the one entry it's own section is not an option? If not, all I could think of is a CP plug in with a hook ...
thomas
<control-panel><entry>
CP / Backend: Restrict single entry only to admins (edit / delete)
# CP / Backend: Restrict single entry only to admins (edit / delete)

(Asked by: username_0 on 2023-09-12)

I'm searching for an idea, to protect a single entry from being edited / deleted by editors (CP / backend).
Of course, it's easy to do for fields or sections, but for a single entry ... hmmm ...

* <https://plugins.craftcms.com/isolate?craft4> -> that's not fitting to my needs
* a concept could be, to manipulate the CP with CSS / JS -> looks like a dirty hack
* maybe a custom plugin is needed -> a problem for me, unfortunalety

Any ideas? :)

**Tags:** control-panel, entry

> **Comments:**
> **username_1**: Making the one entry it's own section is not an option? If not, all I could think of is a CP plug in with a hook ...  

---

## 2 answers

### Answer by username_2 on 2023-09-22. Score: 0

Without using singles, you'll need to write a module to add this functionality.

I'd recommend adding a new field to the section called "User Allow List" (or "Deny List" you can go either way with this).

Add an on-event function that checks the users in this field and sends a 403 if the current user does not match.

Add an on-save function for entries in this section that auto-populates your default list of Users. Now that I've typed this far.... best to do this by User Group and not individual Users. Have the field be a dropdown and not a User selection field, have the values match the ID or slug of the user group and check against that group.

Then you can add/remove users from that access list to manage it.

(you could also browse the plugin marketplace, I havent looked but maybe someone has published something like this already)

> **Comments:**
> **username_0**: Ok, thx for you comment, Cherry!  This'll be my challenge to write my first module ... but you gave me a concept at least. :)  
> **username_2**: Best of luck! You'll feel great once you do one ^_^  

---

### Answer by username_3 on 2023-09-12. Score: 0

Just use a single for that entry. When you add a new single, existing users have no access by default.

Additionally, if your page must live within a structure, you can create a new page type (e.g. 'Linked entry') with a field that can select only one entry from 'singles'. In the template for your new page type takes the input from that field and use it to create a [redirect](https://craftcms.com/docs/4.x/dev/tags.html#redirect) to your single; which editors do not have permission to edit/delete.

Something like this:

[![enter image description here](https://i.sstatic.net/bmhjf.png)](https://i.sstatic.net/bmhjf.png)

> **Comments:**
> **username_0**: Thanks for your input, Seth!  But that's not working: In my case, it's a subentry inside a structure ... concrete a specific subpage of the sitemap.  But I want to be sure, that this subpage will not be deleted by mistake by any editor.  
> **username_3**: Does it really have to be in a structure though? You could set up the single URL to appear as though it belonged in the structure; and was included in the site map accordingly. E.g: /about/press-releases/not-really-a-press-release could just be a single; an uneditable one-off  
> **username_0**: Yes ... because the editors are free to add / edit / remove subpages of this entry. I just want to protect this parent entry, because this entry id and position in the pagetree is important. It's a kind of "folder" ... not a page.  
> **username_0**: The concept to remove functionality in control panel with css / js is not too bad ... but it still is a dirty workaround and I'm missing a state of the art concept for this usecase in Craft.  

---

