Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with resource_type = 'privilege' #37

Open
brazorf opened this issue Oct 28, 2015 · 0 comments
Open

Working with resource_type = 'privilege' #37

brazorf opened this issue Oct 28, 2015 · 0 comments

Comments

@brazorf
Copy link

brazorf commented Oct 28, 2015

I'm trying to fetch a list of all permissions, in order to build a backend.

I'm using this query to fetch all available permissions:

$permissions = \DB::table('lock_permissions')
    ->groupBy('type')
    ->groupBy('action')
    ->groupBy('resource_type')
    ->groupBy('resource_id')
    ->get();

I've noticed that when a $lock->deny() is issued, a new record with type='restriction' and resource_type='privilege' is inserted.

Is it safe to consider all records with resource_type=privilege as restrictions?

EDIT
However, maybe the Driver itself should define specific methods to fetch this kind of information, in order to decouple from the database structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant