Forum

Thread tagged as: Api

Ability to save draft but not publish

I have a client who needs to create a role whereby a user can save a draft edit of an item, but not publish those changes.

I've seen this post, and it looks like this isn't possible at the minute: https://forum.grabaperch.com/forum/04-11-2017-allow-a-user-save-edits-to-a-region-but-not-publish

Can you point me in the right direction as to how I might be able achieve this, I'm thinking is there an event hook I can use where I can intercept a region being published, or a means whereby I can dynamically set the 'Save a draft' checkbox.

Thanks

Phil Smith

Phil Smith 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I thought this was something we had, but looking through the code apparently it's not. There's not a distinction between who can draft a revision and who can publish it.

Likewise! Do you think it is do-able without hacking the core files?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Perch or Runway?

Runway

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, let me see what I can do.

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, give Runway 3.0.14 a whirl.

Amazing. I'll have a butchers.

Looks great! Wonder if it might be worth adding a function to bulk assign at /perch/core/users/roles/actions/?id=1

Drew McLellan

Drew McLellan 2638 points
Perch Support

I did think about that, but by default it takes the 'edit' permission (you need to edit in order to publish) so I'm not sure that's entirely necessary. I'll give it some time. (It would've also made this more than something I could quickly implement, which would mean it wouldn't be high enough priority to compete with everything else and therefore wouldn't've happened.)

Understood. Thanks!