RSM-25 add relevant permisisons to teams

This commit is contained in:
Miguel Nogueira 2020-09-10 22:47:51 +01:00
parent 551741c687
commit 982854d5c6
3 changed files with 52 additions and 0 deletions

View File

@ -44,6 +44,7 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/mcamara/laravel-localization" /> <excludeFolder url="file://$MODULE_DIR$/vendor/mcamara/laravel-localization" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mockery/mockery" /> <excludeFolder url="file://$MODULE_DIR$/vendor/mockery/mockery" />
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" /> <excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mpociot/teamwork" />
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" /> <excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" /> <excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
<excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" /> <excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" />

View File

@ -141,6 +141,7 @@
<path value="$PROJECT_DIR$/vendor/graham-campbell/markdown" /> <path value="$PROJECT_DIR$/vendor/graham-campbell/markdown" />
<path value="$PROJECT_DIR$/vendor/league/mime-type-detection" /> <path value="$PROJECT_DIR$/vendor/league/mime-type-detection" />
<path value="$PROJECT_DIR$/vendor/mcamara/laravel-localization" /> <path value="$PROJECT_DIR$/vendor/mcamara/laravel-localization" />
<path value="$PROJECT_DIR$/vendor/mpociot/teamwork" />
</include_path> </include_path>
</component> </component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.2" /> <component name="PhpProjectSharedConfiguration" php_language_level="7.2" />

View File

@ -0,0 +1,50 @@
<?php
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
class TeamSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
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',
]);
}
}