rbrecruiter/app/Providers/AuthServiceProvider.php

81 lines
2.4 KiB
PHP
Raw Permalink Normal View History

2020-04-26 04:09:32 +00:00
<?php
2020-10-10 16:30:26 +00:00
/*
* Copyright © 2020 Miguel Nogueira
*
* This file is part of Raspberry Staff Manager.
*
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Raspberry Staff Manager is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
*/
2020-04-26 04:09:32 +00:00
namespace App\Providers;
2021-03-31 02:55:09 +00:00
use App\ApiKey;
2020-10-10 16:30:26 +00:00
use App\Application;
use App\Appointment;
use App\Ban;
use App\Form;
2021-03-31 02:55:09 +00:00
use App\Policies\ApiKeyPolicy;
2020-10-10 16:30:26 +00:00
use App\Policies\ApplicationPolicy;
use App\Policies\AppointmentPolicy;
use App\Policies\BanPolicy;
use App\Policies\FormPolicy;
2020-10-10 16:30:26 +00:00
use App\Policies\ProfilePolicy;
2020-12-08 03:09:17 +00:00
use App\Policies\TeamFilePolicy;
2020-12-08 02:58:10 +00:00
use App\Policies\TeamPolicy;
2020-10-10 16:30:26 +00:00
use App\Policies\UserPolicy;
use App\Policies\VacancyPolicy;
use App\Policies\VotePolicy;
2020-12-08 02:58:10 +00:00
use App\Team;
2020-12-08 03:09:17 +00:00
use App\TeamFile;
use App\User;
use App\Vacancy;
2020-10-10 16:30:26 +00:00
use App\Vote;
2020-04-26 04:09:32 +00:00
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
// 'App\Model' => 'App\Policies\ModelPolicy',
Application::class => ApplicationPolicy::class,
Profile::class => ProfilePolicy::class,
User::class => UserPolicy::class,
Vacancy::class => VacancyPolicy::class,
//Form::class => FormPolicy::class
'App\Form' => 'App\Policies\FormPolicy',
Vote::class => VotePolicy::class,
Ban::class => BanPolicy::class,
2020-10-10 16:30:26 +00:00
Appointment::class => AppointmentPolicy::class,
2020-12-08 03:09:17 +00:00
Team::class => TeamPolicy::class,
2021-03-31 02:55:09 +00:00
TeamFile::class => TeamFilePolicy::class,
ApiKey::class => ApiKeyPolicy::class
2020-04-26 04:09:32 +00:00
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}