Skip Navigation

[Resolved] cred-delete-relationship link not displaying for custom role

This thread is resolved. Here is a description of the problem and solution.

Problem:

I'm trying to use cred-delete-relationship shortcode to unlink event and gallery posts in a many-many relationship. I have the shortcode set up inside a view as the docs say to do:

[cred-delete-relationship role_items='$fromViews' relationship='gallery-event' redirect='self']Delete[/cred-delete-relationship]

Regular "Administrator" users can see and use the link just fine, but my custom "Gallery Manager" user cannot. I've given the Gallery Manager role the "manage_options" which I've read was necessary.

Solution:

In order to delete the relationship with shortcode [cred-delete-relationship]:
Acceptance criteria:

- when you visit the post in the frontend as admin: you should see a list of post related entities AND a button to delete the relationship between each of them.

- when you visit the post in the frontend as a user that HAS NO permissions to edit one of the post types: you should see a list of post related entities and NO button.

https://toolset.com/forums/topic/cred-delete-relationship-link-not-displaying-for-custom-role/#post-2011597

Relevant Documentation:

This support ticket is created 3 years, 7 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by davidS-53 3 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#2011485
Screen Shot 2021-04-06 at 2.36.33 PM.png
Screen Shot 2021-04-06 at 2.23.14 PM.png
Screen Shot 2021-04-06 at 2.22.46 PM.png

I'm trying to use cred-delete-relationship shortcode to unlink event and gallery posts in a many-many relationship. I have the shortcode set up inside a view as the docs say to do:

[cred-delete-relationship role_items='$fromViews' relationship='gallery-event' redirect='self']Delete[/cred-delete-relationship]

Regular "Administrator" users can see and use the link just fine, but my custom "Gallery Manager" user cannot. I've given the Gallery Manager role the "manage_options" which I've read was necessary.

Not sure what's going on here?

#2011597

Hello,

I have checked it in your to-do list, here is the feedback from our developers:
In order to delete the relationship with shortcode [cred-delete-relationship]:
Acceptance criteria:
- when you visit the post in the frontend as admin: you should see a list of post related entities AND a button to delete the relationship between each of them.
- when you visit the post in the frontend as a user that HAS NO permissions to edit one of the post types: you should see a list of post related entities and NO button.

So you can try these:
Dashboard-> Toolset-> Access control-> Post Types
Find all post types related with "gallery-event" relationship, for example "gallery", "event" and intermediator post type "gallery-event", enable all privileges to user role "Gallery Manager", and test again

#2014323

Ahh, thanks Luo. Bit of a workaround but it won't matter at all in this case. Thanks!