Skip to content

Commit

Permalink
Fix canAtLeast() method
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidesu committed Dec 3, 2015
1 parent ff303cf commit 866f400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,10 @@ public function guard()
{
if (class_exists('Caffeinated\Shinobi\Shinobi')) {
$this->filter(function ($item) {
if (! $item->data('can') and ! $item->data('canAtLeast')) {
if (! $item->data('can') and ! $item->data('canatleast')) {
return true;
} elseif ($item->data('canAtLeast')) {
return \Shinobi::canAtLeast($item->data('canAtLeast'));
} elseif ($item->data('canatleast')) {
return \Shinobi::canAtLeast($item->data('canatleast'));
} else {
return \Shinobi::can($item->data('can'));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function can($permissions)

public function canAtLeast($permissions)
{
return $this->data('canAtLeast', $permissions);
return $this->data('canatleast', $permissions);
}

/**
Expand Down

0 comments on commit 866f400

Please sign in to comment.