Implementing access control on breeds listing page.
In the Creating Toolbar and config options at backend section, we have created the configuration options for access control list at backend through which, we are going to control access for a user group to determine which one of it can perform which operation in the component. You can access that by going to the component backend and clicking on the “Options” tab as shown in the screenshot below.
After clicking on this, you will get the configuration page and clicking on the Permissions tab, you will get the following screen which is meant to control access to our component key functions like viewing, creating, editing, deleting, updating and updating own.
In this step of the tutorial, we are trying to implement ACL to our breeds listing page, so that the edit and delete operations access on this page could be controlled. To make it happen, first we have added a code snippet to the default.php file of the frontend breeds listing view, from line 15 to 19 as shown above.
For implementing action controls in the code, we are just calling the authorise() method of JUsers class which takes two arguments, the first one is the action and the second is the asset name. Action refers to the access granted,like create, edit etc and asset name refers to the name of the component.
I basically work in the CMS, like Joomla and WordPress and in framework like Laravel and have keen interest in developing mobile apps by utilizing hybrid technology. I also have experience working in AWS technology. In terms of CMS, I give Joomla the most value because I found it so much user freindly and my clients feel so much easy to manage their project in it.
Enjoy best web development services at an affordable price. Looking forward to build a good relationship and serve you better...
My name is Nohman Habib and I am a web developer with over 10 years of experience, programming in Joomla, Wordpress, WHMCS, vTiger and Hybrid Apps. My plan to start codingace.com is to share my experience and expertise with others. Here my basic area of focus is to post tutorials primarily on Joomla development, HTML5, CSS3 and PHP.