Skip to content

Commit

Permalink
Fix publish permission for non super users
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Oct 11, 2024
1 parent c4ba59c commit 7c8422a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Policies/ResourcePolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ public function delete($user, Resource $resource, $model = null)
{
return User::fromUser($user)->hasPermission("delete {$resource->handle()}");
}

public function publish($user, Resource $resource, $model = null)
{
return User::fromUser($user)->hasPermission("publish {$resource->handle()}");
}
}

0 comments on commit 7c8422a

Please sign in to comment.