Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Grav.user.authorize for logged in users

Started by Sergei 7 years ago · 0 replies · 663 views
7 years ago

I use this to show part of the page to users with 'some.rule' access:

TWIG
{% if grav.user.authorize('some.rule') %}
My content
{% endif %}

The problem is:

if the admin grants access while the user is already logged in, it doesn’t work. In other words, user has to logout and login to see the hidden content.

Can it be fixed?

Can I hide part of a page for group of users somehow else?

Thanks!

Suggested topics

Topic Participants Replies Views Activity
Support · by Paul Hodges, 4 weeks ago
19 487 6 days ago
Support · by Lauw, 7 days ago
2 104 7 days ago
Support · by Anna, 3 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 484 4 weeks ago