Skip Navigation

[Resolved] Relationships and access

This support ticket is created 5 years, 8 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)

Author
Posts
#1235048

Hi

I have a relationship setup between posts and a CPT named tv-show.

I have a user that has access to posts but on the post I want them to be able to set the relationship between the post and a "tv-show". However they can't see any tv-show posts.

Is there a way to give them say view access using Toolset Access so they can see them in the list and set the relationship between the two posts?

Cheers.

#1235257

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

Thank you for contacting our support forum.

Yes you should be able to give the user permissions to access the CPT. Once you have given them permissions to the TV Shows CPT it should start showing up in the relationship field option.

If this does not work please let me know as soon as possible so that I can investigate this further for you.

Thanks,
Shane

#1241783

Hi Shane

Yes I can give them permission to access the CPT but I don't want to.

They only have post access but I want them to be able to set the relationship between the post and the CPT TV Shows. Without having access to edit TV shows, happy for them to be able to view them just not edit them apart from setting the relationship when editing a post.

Is this possible?

#1241912

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

They should be able to do this if its a many to many relationship between the Tv shows and the posts. Failing this you can give them edit permissions and just create an edit form for them with just the relationship field.

This way whenever they edit the post to add the relationship all they will be changing is the relationships and not anything else from the form.

Thanks,
Shane

#1242290

Hi Shane,

It is a many to many relationship. However they don't seem to be able to set the relationship with just post access.

I understand how to give them access to edit any of the CPT TV shows. However I don't want to give them access to that like you said I want to create a form I guess so they can only edit the relationship, I am just not sure where to start with this? How do I go about doing this, so this is all they can do?

Cheers

#1243704

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

If the user role has edit or access privilege to the CPT but dont have backend access then they won't be able to edit the post but it will just serve as they are able to edit the relationship.

I mean they do need edit permissions because setting the relationship is editing the post itself to set the relationship.

With Many to Many relationships you will need to create a relationship form. Have a look at the link below.
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/

Please let me know if this helps.

Thanks,
Shane

#1244098

Hi Shane,

I think there is a little confusion, sorry I am probably not explaining well.

So they have "post" access fully to add, edit etc. They have backend access.

They don't have access to CPT tv-shows. To edit.

I want them to be able to set the relationship the post has with CPT but they don't need access to CPT. Is this possible? Or do they have to have full edit access to all of the CPT tv-shows to do this?

Cheers

#1244217

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

Let me try to explain 🙂

So you say they have access to the "Post" default CPT in wordpress, this is fine.

They don't have to the tv-shows cpt to edit it. This is not fine.

I gather the relationship is between the Posts and tv-shows CPT. Remember that a relationship form is connecting both posts together, so it is editing both posts to set the custom data for the relationship.

If the user doesn't have access to edit the tv-shows CPT then they won't be able to set the relationship.

So in short no it is not possible without them having edit permissions.

Is it that you are concerned about them having access to the backend itself ? If so then you can use this plugin to specify the roles to deny access.
https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/

Please let me know if this helps.
Thanks,
Shane

#1246406

Hi Shane

Ah right ok thanks. It isn't about them having access to the backend, they currently do to edit and create posts. Is it that they don't need access to TV shows really so would prefer not to give access.

Is it possible with Toolset Access to let them edit TV shows but restrict what data they can edit? E.g. lock custom fields etc. Maybe this would be a solution?

Cheers

#1246706

Shane
Supporter

Languages: English (English )

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

Hi Matthew,

Is it possible with Toolset Access to let them edit TV shows but restrict what data they can edit? E.g. lock custom fields etc. Maybe this would be a solution?

Actually yes this is possible for you to lock out the custom fields from the user roles. Just go to Toolset -> Access -> Types Fields and this should be able to allow you to lock the users from editing the custom fields.

Thanks,
Shane