2020-09-10 21:47:51 +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-10-08 22:47:23 +00:00
|
|
|
namespace Database\Seeders;
|
2020-09-10 21:47:51 +00:00
|
|
|
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
use Spatie\Permission\Models\Permission;
|
|
|
|
|
|
|
|
class TeamSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function run()
|
|
|
|
{
|
2020-09-10 22:09:23 +00:00
|
|
|
Permission::create([
|
2020-10-10 16:30:26 +00:00
|
|
|
'name' => 'teams.user.view.own',
|
2020-09-10 22:09:23 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
Permission::create([
|
2020-10-10 16:30:26 +00:00
|
|
|
'name' => 'teams.admin.view.all',
|
2020-09-10 22:09:23 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
// Has access to the teams feature
|
|
|
|
Permission::create([
|
2020-10-10 16:30:26 +00:00
|
|
|
'name' => 'teams.view',
|
2020-09-10 22:09:23 +00:00
|
|
|
]);
|
|
|
|
|
2020-09-10 21:47:51 +00:00
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.admin.create',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.admin.delete',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.user.join',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.user.leave',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.admin.vacancies.assign',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.admin.vacancies.unassign',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.admin.applications.changeteam',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.members.appointment.schedule',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.members.appointment.deleteappointment',
|
|
|
|
]);
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'teams.members.groupchat',
|
|
|
|
]);
|
|
|
|
|
|
|
|
Permission::create([
|
|
|
|
'name' => 'chat.use',
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|