Skip to content

Commit

Permalink
Fix Editing Discussion Tags Permission (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 authored and askvortsov1 committed Oct 5, 2020
1 parent fa83f49 commit cd97f4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Listener/SaveTagsToDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public function handle(Saving $event)

// 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 = [];
Expand Down

0 comments on commit cd97f4e

Please sign in to comment.