lock-laravel icon indicating copy to clipboard operation
lock-laravel copied to clipboard

Permission problem in a view

Open misterdesign opened this issue 9 years ago • 1 comments

Hi @driesvints

I used Laravel 5, version 0.2 of the package and array as driver.

I created an alias to manage the crud, in lock.php

    'permissions' => function (Manager $manager, Lock $caller) {
        $manager->alias('manage', ['create', 'read', 'update', 'delete']);

I set the privilege of the alias for a resource

$manager->role('reseller')->allow('manage',   'users');

I denied one of the actions for that resource

$manager->role('reseller')->deny('create', 'users');

If I try with dd, the action is properly denied :heavy_check_mark: If I try from view, the action is permitted :interrobang:

Is my mistake or a bug?

misterdesign avatar Mar 31 '15 12:03 misterdesign

I'm just gonna be honest with you. I don't have the time atm to look into this and probably won't have for the upcoming weeks. If anyone can take the time to figure this out, that'd be great :confused:

driesvints avatar Apr 17 '15 22:04 driesvints