I was tasked with extending Magento ACL functionality and allowing one user to hold more than one role.
I have been jumping from blog to blog and file to file for the last week - all I can find says only about isAllowed() method - this is nothing to do with what I'm looking for.
Why? If I log all calls to isAllowed() I get different results for admin and user - system already knows for which resources isAllowed() must be called.
I'm trying to create additional tables that holds user_id and role_id ACL would be combine for all your roles.
I'm looking for a place in code when ACL matrix is contracted: I narrowed my suspects to:
loadAcl(); loadRoles(); loadRules() ( $acl->allow() and $acl->deny() )
but I couldn't find any user-specific queries or methods How system know you can access resources or not? Am I looking in the right place?
Also: checking files I found this comment:
//@FIXME: stupid fix of previous multi-roles logic.
in /app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php saveAction() aprx. Line 142
Looks like that functionality was available in previous versions - is there any existing code I could use?
Thank you in advance for any info that can help me to move that forward.