Take the following:
Route::group(['prefix' => 'holidays', 'middleware' => 'permissions', 'permissions' => ['RD - CP - Holidays - R', 'RD - CP - Holidays - RW']], function () {
Route::get('', 'Operations\Personnel\HolidayController@home');
That R group is the entire company, near enough 400 people, bar about 30, which is not elegant. I want to be able to put a permissions group in there that will deny access to the holidays route.
I'm researching, the best I can find so far is to write a custom middleware, but before I commit to a fairly high labour solution, is there a way to simply tell Laravel to exclude members of a permission group?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire