Fix Editing Discussion Tags Permission (#95)

This commit is contained in:
Sami Mazouz 2020-10-03 23:37:56 +01:00 committed by GitHub
parent 80f6e9c808
commit e787048af1

View File

@ -59,6 +59,10 @@ class SaveTagsToDatabase
// TODO: clean up, prevent discussion from being created without tags
if (isset($event->data['relationships']['tags']['data'])) {
if ($discussion->exists) {
$actor->assertCan('tag', $discussion);
}
$linkage = (array) $event->data['relationships']['tags']['data'];
$newTagIds = [];