ACL, actions and user groups.

For Joomla! 2.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Note: All 1.6, 1.7 and 3.5 releases have reached end of life and should be updated to 3.x.

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
diego88
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Aug 16, 2010 3:46 pm

ACL, actions and user groups.

Post by diego88 » Thu Dec 09, 2010 1:16 pm

Hi,
I'm developing an extension for joomla 1.6 but I have some problems.
I need to add new user groups and new actions during installation of my component. I think I can do that with some statements in a XML installation file but I can't find any information about this.
I saw action.xml file but I can't understand what I can do with this file.

Can you help me?


thanks in advance!

User avatar
malaiselvan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 162
Joined: Mon Dec 08, 2008 10:57 am
Contact:

Re: ACL, actions and user groups.

Post by malaiselvan » Mon Dec 20, 2010 7:04 am

You need to define the permission types in access.xml and you need to implement that in your view.html.php on every view.

Refer here
www.joomalai.co.in, www.jeema.net
Your Joomla Specialist from Chennai, India

diego88
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Aug 16, 2010 3:46 pm

Re: ACL, actions and user groups.

Post by diego88 » Wed Dec 22, 2010 11:09 am

I read that page and I tried to create an access.xml in my component but seems not work.

this is my access.xml:

Code: Select all

 
<?xml version="1.0" encoding="UTF-8"?>
<access component="com_area_strumentale">
        <section name="component">
                <action name="com_area_strumentale.mantainer" title="JACTION_MNT" description="JACTION_MNT_COMPONENT_DESC" />
        </section>
</access>
I can't understand why this action is not in joomla ACL manager after component installation.
Can you help me?

User avatar
malaiselvan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 162
Joined: Mon Dec 08, 2008 10:57 am
Contact:

Re: ACL, actions and user groups.

Post by malaiselvan » Wed Dec 22, 2010 11:21 am

Have you created the config.xml file for your component? Refer the same page and create a config.xml.

Once you include the rules inside your config.xml you need show the parameters icon in the view.html.php

JToolBarHelper::preferences('com_helloworld');

You can see the component preferences where you can set the access permission.

Once you define the permission you need to use JAccess/getActions to determine the permissions for the current user
www.joomalai.co.in, www.jeema.net
Your Joomla Specialist from Chennai, India

diego88
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Aug 16, 2010 3:46 pm

Re: ACL, actions and user groups.

Post by diego88 » Wed Dec 22, 2010 2:43 pm

ok! now it works!
I didn't create config.xml.

thank you very much!


Locked

Return to “Joomla! 2.5 Coding”