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 · 574 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 Thomas, 1 week ago
3 95 5 hours ago
Support · by Anna, 3 days ago
2 94 1 day ago
Support · by Justin Young, 1 day ago
1 64 1 day ago
Support · by Duc , 1 week ago
2 100 6 days ago
Support · by Colin Hume, 1 week ago
2 92 6 days ago