Skip Navigation

[Résolu] access control no longer works

This support ticket is created Il y a 4 années et 2 mois. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 15 réponses, has 2 voix.

Last updated by rodneyM Il y a 4 années et 2 mois.

Assisted by: Minesh.

Auteur
Publications
#1501389

After upgrading to latest versions of types and views the access control code
[toolset_access role="Administrator" operator="allow"] .......[/toolset_access] does not work allowing the general public to see everything.

#1501601

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I've just added the following shortcode to one of the post's content area (post body) and I see that its working just fine, as expected.

Can you please share more information - where exactly you have added the following shortcode?

[toolset_access role="Administrator" operator="allow"] .......[/toolset_access] 
#1501715

The site contains a list of bands and I have added a "Print" command beside each one which up until recently was only viewable my myself, the administrator. This allows me to print sensitive information of members.
Displaying the content is controlled by a "view" which includes the following. I have excluded the actual site name.

<ul class="bandlist">
<!-- wpv-loop-start -->
<wpv-loop>
<li class="band">[wpv-post-link][toolset_access role="Administrator" operator="allow"]
<a href="hidden link...................................................../?bandid=[wpv-post-id]]"> Print</a>
[/toolset_access]
</wpv-loop>

#1502861

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

That should work normally. Can you please share Problem URL where I can see the Print button as well as access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1505175

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now: hidden link

There was an issue with the code you added. You might have copy-pasted it and the issue was the double quote was not added correctly. I've changed that and now I can see its working as expected. can you please confirm it works at your end as well.

#1505199

Thanks
While it is not visible to the public unfortunately I cannot see the "Print" command either

Regards

Rodney

#1505211

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

It looks like there is a hard caching going on with your server. As soon as I save the view - it stores that last change when I load the view on the frontend.

Can you please disable any server-side caching?

As you can see with the screenshot - I logged in as a guest user and it's still showing as I'm administrator user:
=> hidden link

As soon as you will disable the cache - it should work.

#1505385
Screenshot 2020-02-12 at 14.53.40.png

I spoke to the server people and they said there was no cache at there end see image.
After logging in and out and them doing the same the Members Brass now works, I copied and pasted the line into the Members Flute view but it does not work for that view. Is it something to do with " as I am on Mac.

#1505405

Sorry but this is weird - when I copied and pasted the link as above it didn't work but when I replaced the " at both ends the Print command was visible not only when logged in as administrator but was generally available to public view, naturally I deleted it again. The brass one still works.
I don't understand why all this just suddenly changed as I did nothing at this end as it was working.
Could I ask you to copy the line into the 3 other views on that page.

#1506425

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

This is strange but I can see its working at this end.

When Loggedin as admin - Please check the following screenshot, the print is available.:
=> hidden link

But when I logged in as Guest subscriber, the print button is not available.
=> hidden link

do you see the same results as I can see now?

#1506605

Yes I can see the same as you for the Brass members, that is the way I want it, so Brass works.

But as I said in the last note I tried to copy and paste that line to the flute members (click on Flute tab - view 'members flute') but the Print command did not show on the flutes page, After replacing the " it appeared on the flute page for admin and the general public.

#1506607

I notice you deactivated Wordfence, can't see this as the culprit, It all started after an update of types/views and WordPress

#1506851

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I've added the views as given under to the followingg page:
=> hidden link

[wpv-view name="members-brass" cached="off"]

[wpv-view name="members-flute" cached="off"] 

Can you please confirm it works as expected? If yes, you should add all other views as above.

#1506857

yes the 2 pages are behaving as expected

#1506859

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok great - so finally, we found the solution 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.