Saltar navegación

[Resuelto] Access Control – Stop guests from viewing posts

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
Guests can see posts but the client wants them restricted.

Solution:
In the Access settings be sure to uncheck the option for guests to have read access to the post type in question.

Relevant Documentation:
https://toolset.com/documentation/user-guides/setting-access-control/

This support ticket is created hace 5 años, 10 meses. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Este tema contiene 5 respuestas, tiene 2 mensajes.

Última actualización por Ronald E hace 5 años, 10 meses.

Asistido por: Nigel.

Autor
Mensajes
#1202911
toolset-access-question.png

I am in the midst of creating a discussion forum using Toolset. I am having Members (logged in) to create a question. I'm using WordPress Posts as the way to do it since it has built in comments capabilities. Once posted other members can come in and make comments.

The problem I'm running into is other people can see the posts even when they are not logged in. I know I need to go into Access Control, select Posts Groups, and create a group for Logged In Users and add all the pages (see screenshot).

Is there a way that all WordPress Posts would require a login using Access?

Thanks
Ron

#1203321

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Hi Ron

If you want all posts to be included in an Access Post Group then you probably shouldn't be using a Post Group at all, and instead applying settings at the post type level on the first Access page.

Remove access for guests and set what to display instead: https://toolset.com/documentation/user-guides/setting-access-control/#choosing-what-to-display-when-read-access-is-denied

Would that work?

#1203360
toolset-access-2.png

thank you. I maybe doing things right then. I was just having the Comments show under the login screen until they logged in. (see image). Probably in the template. I'll try to figure out. Keeping this open just in case I can't.

#1203498
toolset-access-control-guest-look-at-post.png
toolset-access-control-settings.png

Hi Nigel,

I believe I have the settings correct on Access Control (although its kinda of wierd I have 2 Posts listed on Post Types). I have it set for non registered users to go to the login form content template. (see screenshot access control settings)

But when I am not logged in and I go to the Post Link I'm seeing all the comments, . (see screenshot guest look at post). You can tell I'm logged out since each message is saying login to reply. Only problem is if they click on those links they are taken to the WordPress login and not the one I created using Toolsets Post Forms.

Client does not want the outside world see any comments or questions due to legalities. Only logged in members get to see the questions or the comments. Can you take a look at my site and see why it's not working like it should? I can grant you a user account so you can log in and see how this is working?

#1203859

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Hi Ron

From your screenshot the settings you have *allow* guests to view posts.

You need to uncheck the option for guests to read posts.

Then, when they try to visit a post which they are not allowed to see they will get the login form instead. At no time will they see comments associated with the post.

That is the setting for standard posts, meaning guests would not be allowed to see blog posts for example either.

If that's not your intention you may need a custom post type for this.

Btw, you see two "posts" because another plugin registers a post type with a name of Posts. We have an internal ticket to hide it or display something else to avoid confusion.

#1204120

Wow, love it when the fix to the problem is just 1 click on a radial button. My issue is resolved now. Thank you!