Cms: Site user is able to entirely disable an entry

Created on 26 Apr 2018  路  5Comments  路  Source: craftcms/cms

Description

User having rights for specific site only is able to disable a page that it would not be available for other sites as well.

Steps to reproduce

  1. Create a user having a right to change specific site's sections
  2. Edit an entry and notice that user is able to toggle global Enabled switch

Proposed solutions

  1. Add a special user right needed to disable an entry globally
  2. Change the behavior of status change dropdown in entries listing. It is quite confusing that although we are working in the site context it influences global entry state. Ability to disable an entry globally is quite a rare thing and can be done through entry editing page

Additional info

  • Craft version: 3.0.2
enhancement user management

Most helpful comment

Change the behavior of status change dropdown in entries listing. It is quite confusing that although we are working in the site context it influences global entry state. Ability to disable an entry globally is quite a rare thing and can be done through entry editing page

Yes, this is very confusing! I would like to see this change as well.

All 5 comments

Change the behavior of status change dropdown in entries listing. It is quite confusing that although we are working in the site context it influences global entry state. Ability to disable an entry globally is quite a rare thing and can be done through entry editing page

Yes, this is very confusing! I would like to see this change as well.

This is still an issue in 3.1.12, and I think this is more than an enhancement. In a multisite environment, a user with access to making changes to a single called "landing page", also have permission to disable the landing page for every site in the environment.

A quick fix for this could be {% if isAdmin %} instead of {% if canPublish %} for "Enabled Globally".

I can't seem to find a good temp fix for this either, is there any configuration we can do to swap out the _edit.html file until a fix is supplied, @brandonkelly ?

Temp fix (not secure at all, but at least people wont toggle it by mistake)

if(!Craft::$app->user->isGuest) Craft::$app->view->hook('cp.entries.edit', function(array &$context) {

    if(!Craft::$app->user->isAdmin) echo "<style>#enabled-field {display:none;}</style>";
});

I know estimates are hard, but any idea of a possible release date for this (or version 3.2)?
Will have a go with the workaround in the meantime.

Update: People in the same situation might also want to use the following css to also hide the general disable on the overview.

.menu li a[data-value="disabled"] {
    display:none !important;
}

This has been resolved for Craft 3.4! See https://github.com/craftcms/cms/issues/2899#issuecomment-573330898 for all the details.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timkelty picture timkelty  路  3Comments

angrybrad picture angrybrad  路  3Comments

michaelhue picture michaelhue  路  3Comments

darylknight picture darylknight  路  3Comments

angrybrad picture angrybrad  路  3Comments