Hide section on "Entries" tab 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?
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()-&gt;userSession-&gt;getUser();

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