0

We are developing an application using larval spark

A user will be able to invited to multiple teams.

With in each team there are a number of venues, we want each user to have specific permissions for that venue.

I.E User will have the edit-venue-details permission for venue A but not for Venue B

Is there a way of linking Spatie permissions to an ID? So we can validate on a per venue basis.

Otherwise if we give a user edit-venue-details permission it will be valid for all of the sites, users will not have the same permissions on each venue.

apokryfos
  • 38,771
  • 9
  • 70
  • 114
JaChNo
  • 1,493
  • 9
  • 28
  • 56

1 Answers1

0

Spatie/laravel-permission is more concern with high-level permission/roles over certain features

Where the concept you are referring to is known as Model Policies which Laravel implements by default you may find more details in https://laravel.com/docs/5.8/authorization#generating-policies

Find this example maybe it will make it clearer, https://github.com/drbyte/spatie-permissions-demo/blob/master/app/Policies/PostPolicy.php

mustafa96m
  • 329
  • 3
  • 16