Reputation: 6820
I found this in the old code that I'm trying to refactor but I have no clue what it means. Can someone explain this rule of code to me?
if (!LibraryName_Feature_Access_RoleHelper::roleHasAccess($plan_code, 'can_subscribe')) {
$this->_redirect('error/404');
}
Thanks in advance!
Upvotes: 1
Views: 59
Reputation: 3986
if (!LibraryName_Feature_Access_RoleHelper::roleHasAccess($plan_code, 'can_subscribe')) {
$this->_redirect('error/404');
}
In the above code, $plan_code has some value. It might be Admin code or Guest User code, and its checking whether that particular type of user can subscribe or not, means that user has the access authority to subscribe or not.
For detail inquiry, please check this link. http://framework.zend.com/apidoc/2.0/classes/Zend.Permissions.Acl.Acl.html
Upvotes: 2