diff --git a/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md b/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md index 1618635..53cd6e8 100644 --- a/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md +++ b/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md @@ -322,18 +322,17 @@ Be sure to add a filter using the admin area of the site, main menu option by se Components - Component Builder - Dynamic Gets - Looks - Tweak * Where Table Key a.created_by equal = $this->user->id -This Tweak to the Dynamic Get in JCB for the Demo component site view looks, Dynamic Get, getListQuery, extends it to only include records from the table that were created by the user having the same id as the current user. This is available from the site view looks, $this variable, user id form element. The change takes effect once you use JCB to compile the component and install it again using the Joomla! extension installer. The same Tweak is required in Site view looking - Dynamic Get - getItem. +This Tweak to the Dynamic Get in JCB for the Demo component site view looks - Dynamic Get - getListQuery, extends it to only include records from the table that were created by the user having the same id as the current user. This is available from the site view looks - $this variable - user id form element. The change takes effect once you use JCB to compile the component and install it again using the Joomla! extension installer. The same Tweak is required in Site view looking - Dynamic Get - getItem. Doing the above also ensures only certain actions are allowed for certain users. In our case, a Registered User should only be allowed to: - * Save * Save and Close * Close -The filter allows them to edit only their own look records in the demo_look table. If you need to see all of the demo records, using all the edit features and available buttons, and more, login to the site area as a Super Administrator to see all records in the admin view. If you perform the previous instructions a Registered User's actions will be restricted to display only the following buttons in the looking view: +The filter allows them to edit only their own look records in the demo_look table. If you need to see all of the demo records, using all the edit features and available buttons, and more, login to the site area as a Super Administrator to see all records in the admin view. If you perform the previous instructions a Registered User's actions will be restricted to display only the following buttons in the looking view: -* Save button -* Save and Close button +* Save button +* Save and Close button * Close button If you add more permissions such as Create, two more buttons will appear, Save and Copy plus Save and New. You can remove buttons by changing the permissions back to inherited which should then display as not allowed. Remember they must have been defined first, as mentioned previously, to appear in the list of Permissions. After adding the appropriate actions and permissions to the view and compiling it, the changes will take effect. Note, you can change the JCB Demo component Joomla! ACL permissions and see the effect since components do not need to be compiled by JCB for these settings to change since the change is being done within Joomla!. @@ -341,9 +340,9 @@ If you add more permissions such as Create, two more buttons will appear, Save a Continuing with the edit functionality: * Edit the look record in the demo_look table. It is important you understand this is reusing the admin view look, edit look. If you use Chrome Developer tools to view the page source and go to the form tag you will see it is using the admin form in the looks view: