Skip to content

Commit

Permalink
delete topic require admin permission
Browse files Browse the repository at this point in the history
  • Loading branch information
nauxliu committed Sep 25, 2015
1 parent 26701fd commit fb36c31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/TopicsController.php
Expand Up @@ -162,6 +162,7 @@ public function sink($id)
public function destroy($id)
{
$topic = Topic::findOrFail($id);
$this->authorOrAdminPermissioinRequire($topic->user_id);
$topic->delete();
Flash::success(lang('Operation succeeded.'));

Expand Down

0 comments on commit fb36c31

Please sign in to comment.