Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Restricting Front End Viewing of Records 22 Nov 2016 19:08 #14720

Assuming I want to have users login and see a list of items in their collection. Is there a way to build a front-end page that only lists the records/items assigned to a that specific user?

Please Log in or Create an account to join the conversation.

Restricting Front End Viewing of Records 22 Nov 2016 19:41 #14721

In a nutshell yes:
Create a field on the table such as created_by and use the author wizard to automate the process.

On the list page, use a filter to pull only the records created by the logged in user.

Warm regards
v

Please Log in or Create an account to join the conversation.

Restricting Front End Viewing of Records 23 Nov 2016 08:17 #14724

Although filters are handy to search through data, using them for default views can be troublesome (I found). Depending on how the user is navigating, the filters are sometimes ignored (or forgotten).

If you want more control over the data displayed, fork the model function populateState() with this line...
if (!$acl->get('core.admin')) $this->setState('query.where', array("a.created_by = $userId"));  // Just show own records - unless you are the  admin
Just call me Chris :)
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.108 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started