Skip to content

Commit

Permalink
Merge pull request #571 from Mechzeit/2.0.x
Browse files Browse the repository at this point in the history
isAllowed bugfix for Database ACL Adapter
  • Loading branch information
sergeyklay committed Apr 19, 2016
2 parents 8fb5b62 + 823bf46 commit f5cdd6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Phalcon/Acl/Adapter/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public function isAllowed($role, $resource, $access)
// access_name should be given one or 'any'
"AND access_name IN (?, '*')",
// order be the sum of bools for 'literals' before 'any'
"ORDER BY (roles_name != '*')+(resources_name != '*')+(access_name != '*') DESC",
"ORDER BY ".$this->connection->escapeIdentifier('allowed')." DESC",
// get only one...
'LIMIT 1'
]);
Expand Down

0 comments on commit f5cdd6e

Please sign in to comment.