Support the ongoing development of Laravel.io →
Configuration Authentication Security
Last updated 2 years ago.
0

Source: http://administrator.frozennode.com/docs/configuration#permission

'permission'=> function()
{
    return Auth::check();
},

That is for default laravel auth, so you will need these for sentry:


'permission'=> function()
{
    // Check if the user is logged in
    if (Sentry::check())
    {
        // Check if the user has access to the admin page
        if (Sentry::getUser()->hasAccess('admin'))
            return true;
    }
    return false;
},

Just dont forget that hasAccess('admin') is a permission so change it the way you need it

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

farukham farukham Joined 18 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.