Skip Navigation

[Resolved] Access control has been set to allow users to edit, but no 'Edit' in backend

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 13 replies, has 3 voices.

Last updated by Shane 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1208198
Performers ‹ Magic Africa — WordPress.png

I am trying to: allow users to edit their own Custom Post

However, in the backend, the user can only View, not edit

In Access Control, I have set that User Type to 'Edit own' & 'Delete own'.

#1208635

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marcel,

Thank you for contacting our support forum.

Would you mind allowing me to have admin access to the site to check on this for you ?

The private fields have been enabled for your next response.

Thanks,
Shane

#1208838

credentials removed

#1209572

Hello, it looks like you didn't make my last reply private!!

#1209584

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marcel,

I must apologize, I've immediately removed the credentials

#1209696

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marcel,

Seems that you've changed the credentials or disabled them.

However please see the private fields now. If they are still not enabled please let me know.

Thanks,
Shane

#1209994

Here is what I have found so far:

If I change Access Control to allow 'Contributors' to 'Publish' my CPT, then the Contributor-users can edit their own CPT.

However, I don't want them to be able to Publish - only Edit, changing the status to 'Pending Review'.

#1210027

I have done research, so now I have a better understanding.

User Role: Contributor
WP User Role capability as Contributor: Do not allow Publish
Toolset Form access as Contributor: Allow Edit, but submit for review

Result:
The only place where the user can edit is by clicking the provided 'Edit' link to the form that Edits the CPT.
The user cannot edit an already Published post in the back end.

What I would expect to see is either:
(A) If the user tried to edit their existing published post, the back-end allows the post to be edited but not Published, only Submit for review
(B) If the user tried to edit their existing published post in the back-end, they would be forwarded to the form that allows Editing existing CPT content, with submit for review

#1210218

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2019-03-05 at 2.25.01 PM.png
Screenshot 2019-03-05 at 2.24.35 PM.png

Hi Marcel,

Thanks for the explanation.

I checked on this for you and I made a contributor account and was able to edit my own Item.

See Screenshot

This is with publish permissions disabled.

So it seems to be working fine.

Thanks,
Shane

#1210391

I see the submission.

Your user role doesn't allow Publish - it's set as Pending.

Which means that when I (as Admin) Publish it, you will no longer be able to edit it from the back-end.

You'll only be able to edit via the 'Edit existing' form on the front-end.

Fortunately I have found a front-end solution, but it would be ideal if the user could either:
(a) Edit and 'publish' as Pending Review (as the Edit Existing form does)
(b) There's an 'Edit' link but it actually points to the front-end Edit Existing form.

#1210623

Hi, Shane is out today and will return tomorrow to continue assisting you.

#1211416

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marcel,

I see the issue now.

This happens because the user who Publishes the post, is the user who is set as the post author. Thats how wordpress itself operates I believe and not an issue on our end.

So you as the admin would need to manually reset the post author after you've published the post.

Thanks,
Shane

#1211794

I'm a little ahead of you there.

Yes, this has to do with WordPress built-in permissions.

Even if I manually change the author of the CPT to the individual who submitted the post, unless the user also has the ability to Publish, they cannot edit a post that has been published.

If the user can't publish a post, they can't edit a published post ... in the back-end.

However, Toolset offers that same user a front-end ability to take an already published CPT, and submit "for review" an edited version of the post.

Back-end: User without publishing permission cannot edit a published post
Front-end with Toolset: User without publishing permission can submit a form that submits a revision "for review", that does not publish

In other words, that means I need to design all user interactions through the front-end, and prevent them from going into the back-end (where they won't be able to do anything).

#1211988

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marcel,

The main limiting factor here is that the publisher of the post will always be set to the user who hits the publish button rather than the user that created the post.

Since it is a backend feature we are moving to our frontend, this will also hold true on the frontend. The only way to avoid this is to have some secondary author field, this field would get auto-populated with ID of the user, then when the admin comes in and hits published then we copy over the author information in that instance.

Please let me know what you think of this and we can move forward from there.

Thanks,
Shane