Skip to content

Commit

Permalink
fixed policy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nahid committed Jul 22, 2018
1 parent 089215b commit ef093c6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,7 @@ public function setUserRole($user_id, $role_name)
*/
protected function fetchPolicy($ability)
{
$policies = $this->config->get('permit.policies');
$policy_str = explode('.', $ability);
$policy = '';
if (isset($policies[$policy_str[0]][$policy_str[1]])) {
$policy = $policies[$policy_str[0]][$policy_str[1]];
}

return $policy;
return $ability;
}

/**
Expand Down

0 comments on commit ef093c6

Please sign in to comment.