I think there should be different permission for schedule publish and unpublish (or one check for enable/disable the scheduled publish and another one for scheduled unpublish by content type)

In almost all the websites I develop the only feature the user needs is scheduling the publication of a node, that node never will be unpublished.

Having the unpublished fields on the node edit form add noise (UX) to the form and could confuse the user.

Thank you in advance

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rbarlow’s picture

FileSize
6.68 KB

I had a similar requirement a few months ago, I needed to show only the un-publish option.
The attached patch adds an extra checkbox to the node settings page allowing publishing and un-publishing of that node type to be controlled independently.
The patch is for the 6.x-1.6 release, first patch I've created for a drupal module so I don't know if it's normal to provide a patch for a released version or CVS head.

Anonymous’s picture

Thank you, I'll take a look on this :)

Eric-Alexander Schaefer’s picture

I think splitting the permissions could be useful. But it would have to be a non breaking change. That means, if somebody deploys a new version of scheduler with the split permissions, their permission setup should still work. (e.g. if somebody had the permission to use scheduler, he/she should have both permissions after the upgrade)

Eric-Alexander Schaefer’s picture

If you think about it, maybe it should not be a permission but a configuration option?

Eric-Alexander Schaefer’s picture

What is the status of this issue. The patch looks rather promising. Does it work?

SpikeX’s picture

Subscribing. These permissions should be separate, it really makes the most sense that way. When I saw they were combined the first thing I did was come here to see if there was already an issue about it (and there is). Hopefully this patch will make it into a stable version of the module so I can use it.

codycraven’s picture

If this is done as a permission you can make a hook_update_N() implementation that will apply the new split permissions to all roles that currently have the permission.

Eric-Alexander Schaefer’s picture

FileSize
9.8 KB

Please checkout the attached patch. It splits the node type settings as the original patch in #1. Additionally it uses a separate fieldset for scheduler settings (as opposed to be part of "workflow settings") and nested fieldsets for publishing and unpublishing. This might seem like overkill but it will be used for other options for publishing and unpublishing as well as additional actions (e.g. promote/demote/sticky).

The patch is rolled against the current CVS-HEAD (or 6.x-1.x-dev 2010-Oct-07).
Please test! This will be the base for lots of new features...

Eric-Alexander Schaefer’s picture

Status: Active » Needs review
FileSize
1.05 KB

Here comes a patch for scheduler.install to convert the old configuration values to the new ones.

Eric-Alexander Schaefer’s picture

Title: Split schedule (un)publishing of nodes permissions » Split settings for publishing and unpublishing for node types
FileSize
10.81 KB

Ignore the last patch please. Let's say it never happened...

Attached patch includes the changes to scheduler.module (which are based on rbarlows patch, thanks) and scheduler.install. Since nobody is listening anyways I will commit the patch right away. I tested it now for quite a while and it seems to work well.

I also changed the title of this issue because it was never really about permissions, but about hiding unused settings. It might be worth a second thought if a separate permission per setting could be useful. But that would be another issue.

Eric-Alexander Schaefer’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

zilverdistel’s picture

Nice work with this module, has any new stable release been scheduled yet? I really need this patch in production ...

Eric-Alexander Schaefer’s picture

Not yet, but expect it before the end of the year.