<p>There’s no way to give a user group permission to create entries but not see those entries they created in the CP.</p>

<p>The only way to achieve what you want would be to write a plugin that provides its own “save-entry” controller action, which allows users to create the entries without actually having the permission. The <a href="https://github.com/pixelandtonic/GuestEntries" rel="nofollow">Guest Entries</a> plugin would be a good starting point - it has a <a href="https://github.com/pixelandtonic/GuestEntries/blob/master/guestentries/controllers/GuestEntriesController.php" rel="nofollow">GuestEntriesController</a> with an <code>actionSaveEntry()</code> method that behaves very similar to Craft’s built-in EntriesController::actionSaveEntry(), but it skips the normal permission-based authorization logic.</p>

<p>In your case you might still want some level of authorization. For example, you can verify that there’s a currently logged-in user, and that they belong to a certain group. If that’s the case you’ll want to <strong>not</strong> add this line:</p>



<pre class="lang-php prettyprint-override"><code>protected $allowAnonymous = true;
</code></pre>

<p>And at the top of your <code>actionSaveEntry()</code> method, add this:</p>

<pre class="lang-php prettyprint-override"><code>$user = craft()-&gt;userSession-&gt;getUser();

if (!$user-&gt;isInGroup('authors'))
{
    throw new HttpException(403, Craft::t('This action may only be performed by authors.'));
}
</code></pre>

CC BY-SA 3.0
2015-06-27T14:35:04.023Z
2015-06-27T14:35:04.023Z
Brandon Kelly
<p>Under Settings/Users, you can create user groups and set what each different group has access to. So if there is a channel or section you don't want one group touching, then you can toggle it off for that group.</p>

CC BY-SA 3.0
2015-06-24T17:19:40.680Z
Well, I'm using an entry form, so the user needs the permission to create entries in that channel or it won't save (I think). If I didn't need to have that permission on, I'd turn it off to hide the entries from them.Another issue, is that I need these entries to be tied to this user, so I'm using their ID to set them as the author. I guess I could use the Guest Entries plugin and use their ID into a related field, but I was hoping for something on the side of viewing the entries in the CP, than changing out the form controller.
Will Browar
CC BY-SA 3.0
2015-06-23T17:53:30.727Z
2015-06-23T17:53:30.727Z
idahotallpaul
<p>Is there a way to hide a section from the Entries tab based on user permissions? Whether it means creating a user permission in a plugin, or hiding the section selection tab from Entries altogether.</p>

<p>I have a channel that users with a certain permission can create entries in using a front-end form. Once created, I don't want the user to see the entry in the CP or to have the ability to edit it.</p>

<p>I'd like to still allow them to see other entries in the "All entries" tab, so my original plan to hide these sections through CPCSS doesn't work. Any other ideas?</p>

<entries><users><control-panel><permissions><craft-pro>
Hide section on "Entries" tab
# Hide section on "Entries" tab

(Asked by: username_0 on 2015-06-22)

Is there a way to hide a section from the Entries tab based on user permissions? Whether it means creating a user permission in a plugin, or hiding the section selection tab from Entries altogether.

I have a channel that users with a certain permission can create entries in using a front-end form. Once created, I don't want the user to see the entry in the CP or to have the ability to edit it.

I'd like to still allow them to see other entries in the "All entries" tab, so my original plan to hide these sections through CPCSS doesn't work. Any other ideas?

**Tags:** entries, users, control-panel, permissions, craft-pro


---

## 2 answers

### Answer by username_1 on 2015-06-27. Score: 3 | Accepted answer

There’s no way to give a user group permission to create entries but not see those entries they created in the CP.
The only way to achieve what you want would be to write a plugin that provides its own “save-entry” controller action, which allows users to create the entries without actually having the permission. The Guest Entries plugin would be a good starting point - it has a GuestEntriesController with an actionSaveEntry() method that behaves very similar to Craft’s built-in EntriesController::actionSaveEntry(), but it skips the normal permission-based authorization logic.
In your case you might still want some level of authorization. For example, you can verify that there’s a currently logged-in user, and that they belong to a certain group. If that’s the case you’ll want to not add this line:
protected $allowAnonymous = true;

And at the top of your actionSaveEntry() method, add this:
$user = craft()->userSession->getUser();

if (!$user->isInGroup('authors'))
{
    throw new HttpException(403, Craft::t('This action may only be performed by authors.'));
}


---

### Answer by username_2 on 2015-06-23. Score: 2

Under Settings/Users, you can create user groups and set what each different group has access to. So if there is a channel or section you don't want one group touching, then you can toggle it off for that group.

> **Comments:**
> **username_0**: Well, I'm using an entry form, so the user needs the permission to create entries in that channel or it won't save (I think). If I didn't need to have that permission on, I'd turn it off to hide the entries from them.Another issue, is that I need these entries to be tied to this user, so I'm using their ID to set them as the author. I guess I could use the Guest Entries plugin and use their ID into a related field, but I was hoping for something on the side of viewing the entries in the CP, than changing out the form controller.  

---

