Skip Navigation

[Resolved] How to restrict access to child posts

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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)

Author
Posts
#596133

Tell us what you are trying to do? Looking for a suggestion. What's a good way to set access restrictions on a parent post and have the restrictions apply, also, to the children of the parent (as determined by IDs and the post relationship). I see that Post Groups could function this way but that would be a lot of work for admins and it would be prone to errors (forgetting to add a post to a group, for example.)

Is there any documentation that you are following? I've read through the Access Docs

Is there a similar example that we can see?

What is the link to your site? hidden link

#596158

Dear Jerry,

Please elaborate the question with more details, what kind of access restrictions to child posts do you need?
How do you setup the access restrictions on parent post?
Where do you want the access restrictions to take effect? WordPress admin side or front-end?
I need details steps to test it, thanks

#596567

Thanks!

So, there will be one parent post for each customer. There can be many child posts (4 or 5 custom types) for each customer.

All posts are created by an admin, probably via CRED forms to make it as easy as possible.

One customer should not see any of the posts for other customers (parent or child).

There would be only one parent per child.

I can see how to control data that gets displayed in a view -- by post relationship. Done that before. No problem there. But we have to control access to the child posts, same as its parent.

What I'm hoping to do is to somehow have all of the child posts inherit the access settings of their parent. There will, in some cases be hundreds of child posts for a given parent and to add all of them manually, using the dialog box from the post, would be dangerously susceptible to error.

I appreciate your help.

#596589

I assume we are talking about in the WordPress admin side, there isn't such a feature within Access plugin, if you agree, we can take it as a feature request.
And you are right, it should be possible with Views plugin in WordPress front-end, by post relationship.

#596978

If I'm understanding you correctly, I could set all the child posts as editable ONLY by Admins and not accessible by anyone else. Then present the data with a view based on the parent post and display the child content via Post Relationship in the view. And I only have add the Parent Post to a Post Group to control who sees what is in the view. In other words the view can display whatever data we want, even though we restrict everyone from viewing the child posts.

Is that correct?

#597036

Q1) I could set all the child posts as editable ONLY by Admins and not accessible by anyone else.
Yes, you can use Access plugin to setup the child posts as editable ONLY by Admins
https://toolset.com/documentation/user-guides/setting-access-control/

Q2)Then present the data with a view based on the parent post and display the child content via Post Relationship in the view.
In the single post of parent post type, you can create a view to list it's child posts:
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/

Q3) And I only have add the Parent Post to a Post Group to control who sees what is in the view.
You can setup Limiting read access to specific content:
https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/

#597922

I did some testing over the weekend and it appears that what I want to do, I can. Thanks.

The forum ‘Types Community Support’ is closed to new topics and replies.