Restriction with loggin

Hello @mateus.m.luna

I Am trying to make my archive restricted to only logged in users. Any suggestions on previous experiences?

Thanks
Rudi

Hi @dshshproject!

Doesn’t setting all collections as private solve this?

@mateus.m.luna that part yes, but the redirection to the login or register page, how do i do it?
Thanks

Uhmm, so you want a user to be offered a registration page in case it does not have access? I think you can do that with plugins. Take a look at some of this options:

@mateus.m.luna i tried a few of them. Don’t seem to work with Tainacan. They do work for other type of custom posts or pages, but not with Tainacan.

Thanks

Rudi

Can you describe to me more detailed how should that integration work? Which steps are you trying to reproduce that you can do with other custom post types but not with Tainacan ones using one of this plugins?

@mateus.m.luna most of the plugins add a section at the end of a PAGE or POST where you can decide if is going to be accessible with login or not. This section does not show in case of Tainacan. The other form is by deciding in settings of the plugin if a collection will be accessible by login (membership). In this case Tainacan posts and collections show up in the settings of the plugin (Members plugin for example) but after i follow up instructions and set the restriction, for some reason it does not force it on Tainacan.

Hi @dshshproject

They won’t show up in fact, as the Tainacan Item form is a totally different component. But you should still be able to change privacy settings in that page:
image

If you set an item as private, only users with the dedicated capabilities will be able to see the item page. Roles and capabilities are a particular topic that we discuss about here (I’m sorry that it is only in Portuguese, you can try following up with Google Translate or DeepL). In the end, if your user has a role that have rights to see private items, it will be able to enter the page. Otherwise, it will be redirected to a 404. What I was hopping that this plugins could to is to redirect the users that are not logged in (or logged in with a lesse capabilities user) to a login form.

Could you show me some screenshots of this process? There may be a confusion where you must not only set tainacan-collections post type, but also each post type that a collection represents. Also, could you explain to me what it means to “force it” in this case? Just trying to get the details here to see if there is something that we can do.

@mateus.m.luna Hello again,

This is the plugin i am trying now. The paid version.

Thanks