Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Custom permissions simply don’t work
 
MageGuys
Guru
 
Avatar
Total Posts:  380
Joined:  2008-06-07
 

I’ve created two different custom APIs for our cart and permissions don’t work unless I set the permissions for the role to “all”. Has anybody ever gotten anything to work for any role using custom permissions? I found that in the database “all” was set to deny for my role, then there were a bunch of deny entries and a couple of allow ones for my API. Setting “all” to allow (in the database) made things work, but I worry that the code will now ignore the deny entries.

“Access denied” appears to come back for both the resource name, and the method name, so I logged it to find out which one I was dealing with. I’m getting the problem on the resource name (which DOES match what I have in my api.xml file.) Is it possible that since “all” is denied, it stops checking there? (Resulting in everything being denied?) I tried to figure this out myself but I couldn’t make heads or tails of the code. (Which reminds me, could you guys PLEASE start using comments in your code? It isn’t that hard, and it makes life tolerable for those of us that have to dig into it later.)

Again, I cannot get custom permissions to work, period. Can anybody confirm whether or not this is simply a glaring bug in the API permissions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Yep, it is a bug. I tried setting my API user to custom and it access denied on the first product info request I sent it. I put permissions back to all and all was okay. File it as a bug!

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageGuys
Guru
 
Avatar
Total Posts:  380
Joined:  2008-06-07
 

OK, I’ll file it as a bug.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top