Skip Navigation

[Resolved] Building a system for logged in users where they can only see there own data

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

Problem:
The issue here is that the user wants to allow their user's to only have access to posts they created.
Solution:

This can be done by using our Access plugin and instructions can be seen below.
https://toolset.com/documentation/user-guides/setting-access-control/

To ensure that a user can only see his/her post ensure that the Preview Any option is not checked.

This support ticket is created 6 years, 6 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 8 replies, has 2 voices.

Last updated by Stina 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#896484

I would like to build a system where users log in and manage their own data. The data is in a many to many relations and I will use Views and Types to show and store it. So there will be a lot of data stored in the database, but the users are only supposed to see their own data when logged in.

#897985

Shane
Supporter

Languages: English (English )

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

Hi Stina,

Thank you for contacting our support forum.

What you can do is to Create a CPT that would allow the user to enter the data. Then what you can do is to use our Access plugin to restrict it so only the user who created the post can have access to the data that was entered.

Take a look at our Access documentation below and let me know if this helps.
https://toolset.com/documentation/user-guides/setting-access-control/

Thanks,
Shane

#898348

There will be many users and I need some sort of:
If wpv-post-author = logged in user, then show a View with a list of his/her entries, not any others.
In that list, there will be links to edit and create new posts with CRED. Which in turn will show up in that user's list.
I've found conditional output, but can't see how to implement it in this way.

And by the way are there a beta with many to many possibilities? If not, when?

#898731

Shane
Supporter

Languages: English (English )

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

Hi Stina,

Actually this is what is done when you set the correct permissions and then display the list of posts.

Only the ones that the user has access to will show up in that list with views.

Thanks,
Shane

#898832

Hi,

I've read the article three times and tried it out at my site and what I can, I can restrict edit and delete to only the owner. But I can't see any way to restrict read to only the owner. It would work if I made a new post type for each user, but that would make it impossible to handle. So how do I restrict read to the owner?

Grateful for any hint.
Thanks, Stina

#898837

Shane
Supporter

Languages: English (English )

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

Hi Stina,

Are all the posts showing up when you look at it ?

Could you send me a screenshot of the permissions for the CPT and this role so I can see what is enabled?

Thanks,
Shane

#901646

Hi Shane,

My Toolset is translated to Swedish, so it's not obvious for me what CPT is. The Access plugin has no options for setting permissions to "Read Own" and that is what I need. I can restrict read on a user level, but not to own posts.

I need some way to restrict it so only the owner of the post can see and edit the content in any way. This includes Views and the drop-down lists in the many to many connection forms.

As I understand it, the basic idea with Access is to control who can publish and edit and what different types of content I can see. What I try to build is a private sphere where the user only will see and handle his or her own data.

If this is not possible, Toolset is the wrong tool, and I'll look for something else. Would very much appreciate if we could sort this out. Thank you!

Stina

#901682

Shane
Supporter

Languages: English (English )

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

Hi Stina,

There should be a Preview Any setting, disabling this should only allow the posts the user created to show up.

#901731

Now I've figured it all out and it works. Wonderful!