Allow members to leave organisations

This commit is contained in:
2022-02-09 12:34:30 +00:00
parent 00128aff5d
commit 711968df08
9 changed files with 189 additions and 5 deletions

View File

@@ -75,6 +75,12 @@ class OrganisationPermissions extends BaseSeed
'conditions' => 'always()',
'description' => 'Merge two organisations together, including all the members.',
]),
'leave_organisation' => new Permission([
'slug' => 'leave_organisation',
'name' => 'Leave organisation',
'conditions' => 'always()',
'description' => 'Allows members to leave organisations.',
]),
'delete_organisation' => new Permission([
'slug' => 'delete_organisation',
'name' => 'Delete organisation',
@@ -163,6 +169,7 @@ class OrganisationPermissions extends BaseSeed
$roleUser->permissions()->syncWithoutDetaching([
$permissions['uri_organisation_own']->id,
$permissions['view_organisation_field_own']->id,
$permissions['leave_organisation']->id,
]);
}
}