How to make user to only his records (e.g. in Library app)?

Posted by Piotr Tucholski on 04-Oct-2014 13:55

Hi,

How to make filtering in Library app that user that logs in could see only items borrowed by himself in Views and Pages?

Thanks,

All Replies

Posted by Santosh Patel on 04-Oct-2014 14:03

Your item borrowed will have a relationship with User object (say borrower). Now the view that you present can have a condition like borrower equals Current User.

Posted by Piotr Tucholski on 04-Oct-2014 14:50

Yes, I know the idea but it doesn't work. What exactly I should put as field value? E.g. UserID equals ?

I ask as CURRENT_USER doesn't work in my example.

Posted by pvorobie on 04-Oct-2014 21:41

The best approach would be assigning permissions to Users (of particular role) or Portal visitors through relationships between User (Visitor) and borrowed items. In this case no filtering is needed (the system will do it automatically).

Posted by Piotr Tucholski on 05-Oct-2014 03:59

Thanks. That sounds good. Data model must be changed I think a little.

This thread is closed