Adding ACL rules to your component
From Joomla! Documentation
Revision as of 00:06, 5 December 2011 by Mrs.siam
This tutorial will demonstrate how to add custom action permission to your component down to object level. Normally we familiar with ACL in global configuration level, category level and component level. Now we will learn how to add action permission control in our component.
JTable class has some built-in support for ACL, to use this you have to add one integer field in your table named 'asset_id'. This field will be used to control action control for your object. Do not confuse with 'access', that is only for access permission (read side) as Joomla! separates other actions from read acess.
Normally, we have to override __construct() method in our descendant class. We may also override check() method to validate our data before saving to database. For ACL action support we have to override these methods:-