Allowing permissions for a customized Magento extension

Posted on October 13, 2012 by Nimrod Techn There have been 0 comments

Assuming we have developed the following extension to Magento admin panel:

app/code/local/Engineering/Custommodule/

And we can actually use it in the admin panel, but when we would like to set the permissions - we go to System -> Permissions -> Users, and try to give the right permissions to our users.

However, it doesn't seem to work, and the non-administrator users will not be able to view the extension (lack of permissions).

 

To solve this, we would create a new adminhtml.xml file in app/code/local/Engineering/Custommodule/etc/

 

Inside the file, we will have the following code:

<?xml version="1.0" encoding="UTF-8"?>
<config>
	<menu>
		<cms> //change to whatever tab you want
			<children>
				<custommodule translate="title" module="custommodule">
					<title>Custom Module</title>
					<action>custommodule/adminhtml_custommodule</action>
				</custommodule>
			</children>
		</cms>
	</menu>
	<acl>
		<resources>
			<admin>
				<children>
					<cms>
						<children>
							<custommodule translate="title">
								<title>Custom Module</title>
								<sort_order>0</sort_order>
							</custommodule>
						</children>
					</cms>
				</children>
			</admin>
		</resources>
	</acl>
</config>

This post was posted in Writing a Magento Extension

Magento is a well-engineered eCommerce platform designed to help engineers develop customized eCommerce online stores. Due to lack of proper coding documentation, Engineer-ing.com was created with the sole purpose of instructing Magento developers to-be with the "how-to-do" know-how. In the event of unresolved issues, you are more than welcome to contact me for consultation. However, please do so only if you possess a Software Engineering background and you're able to specify your question.