Updated 4a. JCB Demo Component Directory, Folders and Files (markdown)
@@ -317,9 +317,10 @@ 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 the 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
|
||||
@@ -336,12 +337,12 @@ 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. You can see this in the form tag located in the source of the page. Use a browser tool such as Chrome, Developer tools to do this.
|
||||
* The registered user id of the logged in user must match the created_by value for it to display and allow the user to edit the record.
|
||||
|
||||
By default, the JCB demo allows all user types except public and guest user groups to view all looks, either they created them or not. To restrict the looks to the specific user, besides the changes to the Joomla! ACL, one must filter the look records in the demo_looks table by owner id. Note, these will take effect without compiling the JCB Demo and other components built using it. The reason is the Joomla! ACL or the global options permissions of the JCB Demo component are being changed for Joomla!'s Registered User Group and not individual permissions within the JCB component. The latter allows for granularity by changing the Joomla!
|
||||
By default, the JCB demo allows all user types except public and guest user groups to view all looks, whether they created them or not. To restrict the looks to the specific user, besides the changes to the Joomla! ACL, one must filter the look records in the demo_looks table by owner id. Note, these will take effect without compiling the JCB Demo and other components built using it. The reason is the Joomla! ACL or the global options permissions of the JCB Demo component are being changed for Joomla!'s Registered User Group and not individual permissions within the JCB component. The latter allows for granularity by changing the Joomla!
|
||||
|
||||
* First, login as the registered user and select the looks option from the main menu.
|
||||
* The site view looks displays with the Name and Description of the registered user's look and an edit toolbar underneath.
|
||||
|
||||
The, click the edit toolbar and display the admin view look, displaying only the form actions defined for that user group.
|
||||
Then, click the edit toolbar and display the admin view look, displaying only the form actions defined for that user group:
|
||||
|
||||
* Save
|
||||
* Save and Close
|
||||
|
Reference in New Issue
Block a user