Integrate custom component in ACL

63 views
Skip to first unread message

Nacho

unread,
Mar 9, 2011, 10:09:30 AM3/9/11
to Joomla! General Development
Hi All,

we're developing a custom component for Joomla 1.6, and want to
integrate it in the ACL, but in the backend the options pane doesn't
show the permissions tab. Is there a basic tutorial on how to do this?

thanks!

tomfuller

unread,
Mar 9, 2011, 11:05:40 AM3/9/11
to joomla-de...@googlegroups.com
Hi Nacho,

Add this field to your components config.xml file:

            name="permissions"
                label="JCONFIG_PERMISSIONS_LABEL"
                description="JCONFIG_PERMISSIONS_DESC"
        >
                <field
                        name="rules"
                        type="rules"
                        label="JBS_ADM_PERMISSION_SETTINGS"
                        class="inputbox"
                        validate="rules"
                        filter="rules"
                        component="com_biblestudy"
                        section="component"
                />
        </fieldset>

Then in one of your view.html.php files under the toolbar area add:

JToolBarHelper::preferences('com_biblestudy','600','800',JText::_('JBS_ADMIN_PERMISSIONS'));

This will control who can access your component.

For more on how ACL can control access to content items, see com_content

Mark Dexter

unread,
Mar 9, 2011, 11:11:00 AM3/9/11
to joomla-de...@googlegroups.com
I don't know for sure, but this might help: http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!1.6_-_Part_14#Describing_the_ACL. Mark


--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.


Nacho

unread,
Mar 10, 2011, 6:52:58 AM3/10/11
to Joomla! General Development
Cool Tom, thanks!

On 9 mar, 17:05, tomfuller <tomfull...@gmail.com> wrote:
> Hi Nacho,
>
> Add this field to your components config.xml file:
>
>             name="permissions"
>                 label="JCONFIG_PERMISSIONS_LABEL"
>                 description="JCONFIG_PERMISSIONS_DESC"
>         >
>                 <field
>                         name="rules"
>                         type="rules"
>                         label="JBS_ADM_PERMISSION_SETTINGS"
>                         class="inputbox"
>                         validate="rules"
>                         filter="rules"
>                         component="com_biblestudy"
>                         section="component"
>                 />
>         </fieldset>
>
> Then in one of your view.html.php files under the toolbar area add:
>
> JToolBarHelper::preferences('com_biblestudy','600','800',JText::_('JBS_ADMI N_PERMISSIONS'));
Reply all
Reply to author
Forward
0 new messages