Skip to content

Commit

Permalink
only owner users with upload rights are allowed to edit albums (Lyche…
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria authored Mar 27, 2024
1 parent 5435ba4 commit c0be4e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Policies/AlbumPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function canEdit(User $user, AbstractAlbum|null $album): bool
}

if ($album instanceof BaseAlbum) {
return $this->isOwner($user, $album) ||
return ($this->isOwner($user, $album) && $user->may_upload) ||
$album->current_user_permissions()?->grants_edit === true ||
$album->public_permissions()?->grants_edit === true;
}
Expand Down

0 comments on commit c0be4e4

Please sign in to comment.