Support the ongoing development of Laravel.io →
Configuration Authentication Security
Last updated 2 weeks 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 weeks ago.
0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

farukham farukham farukham Joined 18 Feb 2014

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.