Skip to content

Commit

Permalink
Merge pull request #26 from emptynick/master
Browse files Browse the repository at this point in the history
Replace canOrFail with authorize
  • Loading branch information
emptynick authored Feb 1, 2019
2 parents 627eae2 + ced8585 commit 7762a0e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Controllers/HooksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(Hooks $hooks, Request $request)
public function index()
{
// Check permission
Voyager::canOrFail('browse_hooks');
$this->authorize('browse_hooks');

$lastUpdated = $this->hooks->getLastRemoteCheck();

Expand All @@ -41,7 +41,7 @@ public function index()
public function install()
{
// Check permission
Voyager::canOrFail('browse_hooks');
$this->authorize('browse_hooks');

$name = $this->request->get('name');
$this->hooks->install($name);
Expand All @@ -52,7 +52,7 @@ public function install()
public function uninstall($name)
{
// Check permission
Voyager::canOrFail('browse_hooks');
$this->authorize('browse_hooks');

$this->hooks->uninstall($name);

Expand All @@ -62,7 +62,7 @@ public function uninstall($name)
public function update($name)
{
// Check permission
Voyager::canOrFail('browse_hooks');
$this->authorize('browse_hooks');

$this->hooks->update($name);

Expand All @@ -72,7 +72,7 @@ public function update($name)
public function enable($name)
{
// Check permission
Voyager::canOrFail('browse_hooks');
$this->authorize('browse_hooks');

$this->hooks->enable($name);

Expand All @@ -82,7 +82,7 @@ public function enable($name)
public function disable($name)
{
// Check permission
Voyager::canOrFail('browse_hooks');
$this->authorize('browse_hooks');

$this->hooks->disable($name);

Expand Down

0 comments on commit 7762a0e

Please sign in to comment.