xiidea / ezRbac

A simple yet easy to implement Role Based Access Control Library for popular PHP framework Codeigniter
http://xiidea.github.io/ezRbac/
86 stars 39 forks source link

Permissions access #15

Closed mithriock closed 10 years ago

mithriock commented 10 years ago

I did have a problem when define access a role. In the controller, i defined method access_map() with the config permissions. In the manage role's privilege manager, I defined the permissions a same role for the method of controller. But, when try access a method, the response is "you do not have sufficient permission to access this resource".

my doubt was on the next line: https://github.com/xiidea/ezRbac/blob/master/libraries/accessmap.php#L214

return $this->_access_details[$action] = (boolean)$this->_access_val & pow(2, $index);

where i changed and leave as follows:

return $this->_access_details[$action] = (boolean)($this->_access_val & pow(2, $index));

And it worked. I work with PHP 5.5.4.