Skip to content

Commit

Permalink
feat(动态): 删除动态接口支持管理员前台删除
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Nov 26, 2018
1 parent 9ed2bcd commit a8eaa7a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/slimkit-plus-feed/src/API2/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,7 @@ public function destroy(
FeedModel $feed
) {
$user = $request->user();

if ($user->id !== $feed->user_id) {
if ($user->id !== $feed->user_id || ! $user->ability('[feed] Delete Feed')) {
return $response->json(['message' => '你没有权限删除动态'])->setStatusCode(403);
}
$feed->getConnection()->transaction(function () use ($feed, $user) {
Expand Down

0 comments on commit a8eaa7a

Please sign in to comment.