Member update endpoint can now change ownership

This commit is contained in:
Constantin Graf
2024-07-01 16:56:18 +02:00
committed by Gregor Vostrak
parent 264b7c9b8d
commit 3a17ae83ae
16 changed files with 352 additions and 85 deletions

View File

@@ -27,7 +27,7 @@ class UpdateMemberRole
*/
public function update(User $actingUser, Organization $organization, string $userId, string $role): void
{
if (! app(PermissionStore::class)->has($organization, 'members:change-role')) {
if (! app(PermissionStore::class)->has($organization, 'members:change-ownership')) {
throw new AuthorizationException();
}