Magento – Access Denied for user in admin

magento-1.9permissionssupee-6788

I am using magento 1.9.2.2 and working market place extension where special permission were provide to vendors so that Backend will be restricted to vendor but it is showing access denied. I had provided all the required permission to user and same extension worked with 1.9.1.x.
Permission used in config.xml is like

<acl>
            <resources>
                <admin>
                    <children>
                        <ooorza>
                            <title>Ooorza</title>                           
                            <children>
                                <marketplace>
                                    <title>Market Place</title>                                 
                                    <children>
                                        <pending_products>
                                            <title>Pending Products</title>                                         
                                        </pending_products>
                                        <manage_vendors>
                                            <title>Manage Vendors</title>                                           
                                        </manage_vendors>
                                        <reviews_ratings>
                                            <title>Reviews and Ratings</title>                                          
                                            <children>                                  
                                                <pending_reviews>
                                                    <title>Pending Reviews</title>                                                  
                                                </pending_reviews>
                                                <all_reviews>
                                                    <title>All Reviews</title>                                                  
                                                </all_reviews>                                      
                                                <manage_ratings>
                                                    <title>Manage Ratings</title>                                                   
                                                </manage_ratings>
                                            </children>
                                        </reviews_ratings>
                                        <manage_verification>
                                            <title>Verification</title>                                         
                                            <children>
                                                <manage_type>
                                                    <title>Manage Types</title>                                                 
                                                </manage_type>
                                            </children>                                                
                                        </manage_verification>
                                        <configuration>
                                            <title>Configuration</title>                                            
                                        </configuration>
                                    </children>
                                </marketplace>                    
                            </children>
                        </ooorza>            
                        <vendor>
                            <title>Vendor</title>
                            <children>                                
                                <orders>
                                    <title>Orders</title>
                                </orders>
                                <transaction>
                                    <title>Transactions</title>
                                </transaction>
                                <review>
                                    <title>Reviews</title>
                                </review>
                                <configuration>
                                    <title>Configuration</title>
                                </configuration>
                            </children>
                        </vendor>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <marketplace>
                                            <title>Market Place Section</title>
                                        </marketplace>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>

and admin routing won't break in admin login
can anyone has solution to it

Best Answer

You need add this function below in each your Adminhtml controller:

protected function _isAllowed()
{
    return Mage::getSingleton('admin/session')->isAllowed('your_vendor/children_name'); // It return true/false with acl set with user
}

Example With your acl:

return Mage::getSingleton('admin/session')->isAllowed('vendor/orders');// with tags Orders