Skip Navigation

[Résolu] cred-delete-relationship link not displaying for custom role

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 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.

This topic contains 2 réponses, has 2 voix.

Last updated by davidS-53 Il y a 3 mois et 2 semaines.

Assigned support staff: Luo Yang.

Auteur
Publications
#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

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

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!