Skip Navigation

[Resolved] Problem with access control

This support ticket is created 5 years, 7 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Author
Posts
#1258327
Schermata 2019-06-04 alle 15.08.43.jpg
Schermata 2019-06-04 alle 15.07.44.png

I am trying to: blog a page to some roles, but the page are visible, with "Articles Group" (gruppi degli articoli in Italian)
The role of this example is "subscriber".

Link to a page where the issue can be seen: hidden link

I expected to see: "404"

Instead, I got: the content...

A second question: with "Articles Group" (gruppi degli articoli in Italian) i want to filter 2 types of post for 2 different types of user: the post itself are filtered (visible to 1 group, blocked to another), but in the blog page all the roles see the preview all all the post...
Can I filter also the "preview" of the post?

#1258853

Hi, can you provide login information for a subscriber? Or is it okay for me to create a new temporary User who is a subscriber? I would like to test this on the site.

#1260109

Is the problem resolved if you temporarily deactivate Elementor Pro? I can see there is a template for this Page: hidden link

Assigning a Content Template and an Elementor template to the same post will have unexpected results.

#1260193

So...
Just tried, but no changes!
I DEACTIVATE ELEMENTOR, but subscriber can see this pages!

hidden link (HIDE, IT WORKS)

hidden link (VISIBLE, DON'T WORKS)

hidden link (VISIBLE, DON'T WORKS)

hidden link (VISIBLE, DON'T WORKS)

hidden link (VISIBLE, DON'T WORKS)

Now ELEMENTOR is ACTIVE

#1260255

Okay at this point I think it's best for me to create a clone of your site using the Duplicator plugin. Then I can run some additional tests without breaking your live site. If you approve, I will get started.

#1260291

Ok!
Also, please, try to give me an answer to the second part of the ticket, please.

#1260469

Okay I am able to see the 404 page issue with only Toolset and WPML plugins active, so I am reporting this to my 2nd tier for further investigation. As far as the "preview" of a post, you can use Access conditionals or conditional HTML to hide certain contents: https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/

You can add Access conditionals to a WordPress Archive to control visibility of each post.

#1260853

"You can add Access conditionals to a WordPress Archive to control visibility of each post."
Ok, the "archives" are two particular categories: how can I add Access conditionals to this categories?!

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/control-access-in-specific-category-archives/

#1261223

I'm splitting your question about Access conditionals into a separate ticket so we can discuss in more detail.

#1265461

It turns out, this is the expected behavior. The hierarchy as stated by Developer (and as working since ever in Access) is:
- WPML Groups (wins all)
- Post Groups
- Post type permissions (has less prevalence)

WPML Groups is a special permission that overrides post groups and post types, even though you need to at least control the post type with Access to have WPML Groups working. I have asked our documentation team to update the documentation regarding these Access permissions, and how they work together.

#1266231

Ok, but...
I have to activate WPML Groups because our ADMIN didn't see the translated homepage of our site... (here the WPML ticket: https://wpml.org/it/forums/topic/tradurre-la-home-del-sito-con-tema/)
Now how can I set up all?

New threads created by Beda and linked to this one are listed below:

https://toolset.com/forums/topic/wpml-groups-seem-to-control-admin-roles/

#1267533

Hi Luca, let me explain this directly, since I had worked on the issue you reported to Christian.

Admins do not have to get specific rules to see translated contents, admins can in fact not be edited with Access at all, they always have all rights given by WordPress.
If WPML would require Toolset Access to give Admins the rights to access a translation, it would mean WordPress doesn't allow it - which is not the case.

I've read the WPML thread you shared and see that the what lead to giving Admins particular rules is "Ho scoperto che i soli utenti ADMIN hanno questo problema, entrando con un utente di livello inferiore la pagina si vede!", which means that any role below the Admins was actually able to see those translations, but not Admins.
This is an alarming fact, that cannot be the case if those users are Admins, at all.
Admins by WordPress core have the rights over everything in WordPress.

Toolset Access cannot alter the rights over an Admin. The checkboxes for Admins are actually greyed out when you try to set post controls over Admins with Toolset Access.
Also on WPML Groups, you cannot alter Access details to the Admins, which means, they always have all powers.

It's also mentioned here:
https://wpml.org/documentation/translating-your-contents/how-to-use-access-plugin-to-create-editors-for-specific-language/
"Normally, if you want to set a user as an editor for a language, then this user has to be an administrator of the entire site. Access provides the functionality to set access rules for specific user roles or individual users on specific content types and languages."

So, if you are admin, you will always do anything you want on the site, there are no restrictions.

The only explanation to this issue is that something (by mistake) made the user you used to test with have no rights over that particular page or language.
That can be for many things, inclusive database corruption, but it's not due to the expected hierarchy of Access which works like this since it was implemented:
- WPML Groups (wins all)
- Post Groups
- Post type permissions (has less prevalence)

I also confirmed locally that I cannot replicate an issue with WPML and Access where Admins would not see content.

This requires a new ticket, which I would suggest opening in WPML but we can also proceed with it here in Toolset, if it turns to be a WPML issue I can internally forward this.

Note that setting a WPML Group will not affect what Admins see or not - no setting in Toolset Access can affect the Admins (you cannot alter settings for Admin with Access).

It seems to me the only issue left is that you have an admin user who cannot see a particular page on the site .

If you want to proceed in Toolset Forum, i'd need to know what you mean by this:
"Nel plugin "Controllo di accessi" di Toolset, è comparsa la linguetta "Gruppi di WPML". Ho creato un gruppo con tutte le lingue abilitate alle "pagine" ed ora funziona anche per gli ADMIN."
https://wpml.org/it/forums/topic/tradurre-la-home-del-sito-con-tema/#post-3816169

When did the tab appear with the WPML groups? This tab should be present as soon you activate Toolset Access and WPML - this is not a new feature or something that can be disabled somehow, so it should be there always when the required plugins are active.
As mentioned, with this group you cannot control or alter access for admins, and it should not affect what admins see either.

That's where we would need to hook in and solve.

I opened a new ticket for you here where we can attack this problem:
https://toolset.com/forums/topic/wpml-groups-seem-to-control-admin-roles/
Please feel free to follow up there, so you don't have to open a new ticket yourself at either WPML or Toolset.

Please let me know if related to the expected Toolset Access hierarchy there are any doubts left.

#1267667
ROLE.jpg
SHOP.jpg

Ok, i made a TEST site: hidden link where you can make tests... same users.
Now I removed the WPML rule, and it's working!!!

Only a small problem remains: the SHOP PAGE, also if I have an Article Group rules that don't allow subscribers to view it... stay visible! hidden link

The rule remove the SHOP from the menu, but the direct access ifs possible...

New threads created by Beda and linked to this one are listed below:

https://toolset.com/forums/topic/something-not-working-with-shop-rules/

#1268925

We need to separate issues, as mentioned earlier I opened a new ticket for you here https://toolset.com/forums/topic/wpml-groups-seem-to-control-admin-roles/ to follow up about the issue of WPML Groups controlling the Admin.
I copied your answer over there, please follow up there if there are issues remaining, however, I see that it's now resolved for good it seems without the need of any WPML Group.
Please follow up here about this issue https://toolset.com/forums/topic/wpml-groups-seem-to-control-admin-roles/

Related to the other issue, this is not related to anything reported in this ticket earlier, so we need as well a new topic for it, so we can keep things nice and clean.

Please follow up here for this new issue:
https://toolset.com/forums/topic/something-not-working-with-shop-rules/

We can close this issue here as solved since the WPML group problem is clarified now.

#1268935

WPML topic closed.

The "shop" problem is related to this topic... but I reply to you in he new thread.

Thanks