Skip to content

Commit

Permalink
Fixes on ticket policy
Browse files Browse the repository at this point in the history
  • Loading branch information
24aitor committed May 9, 2017
1 parent 86f094b commit 0823f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Policies/TicketPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public function publicCreate($user)
*/
public function view($user, Ticket $ticket)
{
if ($ticket->user_id != $user->id) {
return User::findOrFail($user->id)->superAdmin();
if ($ticket->admin_id == $user->id) {
return true;
}

return User::findOrFail($user->id)->hasPermission('laralum::tickets.view');
Expand Down

0 comments on commit 0823f7b

Please sign in to comment.