Question

I added a new user which has ALL rights. However, he can't open the site in admin under

Catalog -> Manage Attachments.

URL: /fileuploader/adminhtml_fileuploader/index/key/

enter image description here

I already logged the user off and on, but still access denied

EDIT: I figured out that it is not a Magento core product. It is a extension, found in app/community/Uni/Fileuploader

app/community/Uni/Fileuploader/etc/config.xml

<?xml version="1.0"?>
<!--
/**
* Unicode Systems
* @category   Uni
* @package    Uni_Fileuploader
* @copyright  Copyright (c) 2010-2011 Unicode Systems. (http://www.unicodesystems.in)
* @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*/
-->
<config>
    <modules>
        <Uni_Fileuploader>
            <version>0.2.1</version>
            <modified>0.2.1.2</modified>
        </Uni_Fileuploader>
    </modules>
    <frontend>
        <routers>
            <fileuploader>
                <use>standard</use>
                <args>
                    <module>Uni_Fileuploader</module>
                    <frontName>fileuploader</frontName>
                </args>
            </fileuploader>
        </routers>
        <layout>
            <updates>
                <fileuploader>
                    <file>fileuploader.xml</file>
                </fileuploader>
            </updates>
        </layout>
        <translate>
            <modules>
                <Uni_Fileuploader>
                    <files>
                        <default>Uni_Fileuploader.csv</default>
                    </files>
                </Uni_Fileuploader>
            </modules>
        </translate>
    </frontend>
    <admin>
        <routers>
            <fileuploader>
                <use>admin</use>
                <args>
                    <module>Uni_Fileuploader</module>
                    <frontName>fileuploader</frontName>
                </args>
            </fileuploader>
        </routers>
    </admin>
    <adminhtml>
        <menu>
            <catalog>
                <children>
                    <fileuploader>
                        <title>Manage Attachments</title>
                        <sort_order>1</sort_order>
                        <action>fileuploader/adminhtml_fileuploader</action>
                    </fileuploader>
                </children>
            </catalog>
        </menu>
        <acl>
            <resources>
                <all>
                    <title>Allow Everything</title>
                </all>
                <admin>
                    <children>
                       <catalog>
                            <children>
                                <fileuploader>
                                    <title>Manage Attachments</title>
                                    <sort_order>10</sort_order>
                                </fileuploader>
                            </children>
                        </catalog>
                         <system>
                            <children>
                                <config>
                                    <children>
                                        <fileuploader translate="title" module="fileuploader">
                                            <title>File Uploader</title>
                                            <sort_order>60</sort_order>
                                        </fileuploader>
                                    </children>
                                </config>
                            </children>
                        </system>
                        <fileuploader>
                            <title>Fileuploader Module</title>
                            <sort_order>10</sort_order>
                        </fileuploader>
                    </children>
                </admin>
            </resources>
        </acl>
        <layout>
            <updates>
                <fileuploader>
                    <file>fileuploader.xml</file>
                </fileuploader>
            </updates>
        </layout>
        <events>
            <core_block_abstract_prepare_layout_after>
                <observers>
                    <fileuploader_product_injectTabs>
                        <type>singleton</type>
                        <class>fileuploader/observer_product</class>
                        <method>injectTabs</method>
                    </fileuploader_product_injectTabs>
                </observers>
            </core_block_abstract_prepare_layout_after>
        </events>
    </adminhtml>
    <global>
        <blocks>
            <fileuploader>
                <class>Uni_Fileuploader_Block</class>
            </fileuploader>            
        </blocks>
        <helpers>
            <fileuploader>
                <class>Uni_Fileuploader_Helper</class>
            </fileuploader>
        </helpers>
        <models>
            <fileuploader>
                <class>Uni_Fileuploader_Model</class>
                <resourceModel>fileuploader_mysql4</resourceModel>
            </fileuploader>
            <fileuploader_mysql4>
                <class>Uni_Fileuploader_Model_Mysql4</class>
                <entities>
                    <fileuploader>
                        <table>uni_fileuploader</table>
                    </fileuploader>
                </entities>
            </fileuploader_mysql4>
        </models>
        <resources>
            <fileuploader_setup>
                <setup>
                    <module>Uni_Fileuploader</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </fileuploader_setup>
            <fileuploader_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </fileuploader_write>
            <fileuploader_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </fileuploader_read>
        </resources>
    </global>    
</config>
Was it helpful?

Solution

I was able to solve it by adding this code to the controller (controllers/Adminhtml/FileuploadController.php):

<?php
/**
 * Unicode Systems
 * @category   Uni
 * @package    Uni_Fileuploader
 * @copyright  Copyright (c) 2010-2011 Unicode Systems. (http://www.unicodesystems.in)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
class Uni_Fileuploader_Adminhtml_FileuploaderController extends Mage_Adminhtml_Controller_Action {

    protected function _isAllowed()
    {
        return Mage::getSingleton('admin/session')->isAllowed('fileuploader');
    }

    ...

How do I knew that I have to use fileuploader? Because you have to enter the frontname which is defined in config.xml

<config>
    ...
    <frontend>
        <routers>
            <fileuploader>
                <use>standard</use>
                <args>
                    <module>Uni_Fileuploader</module>
                    <frontName>fileuploader</frontName>
                </args>
            </fileuploader>
        </routers>
        ...
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top