I have a list, where the user only may see the records where he/she has authority for.
Therefore I added some code in the "BeforeProcessRowList"
----
$docId = $data['doId'];
$userId = $_SESSION["userid"];
$auth = DBS::GetDocAuth($docId, $userId);
if ($auth == '*FULL')
return true;
else
return false;
---
The rows are indeed omitted, but the pagination is completely wrong (blank pages, other pages with only 1 record, ...)
Do I have to use an other event?
Actullay no but it is so much easier to setup advanced security with groups ::::
Depends on the authority field . If you have one . setup advanced security settings in phprunner and then go to security settings and look at : authority field ( if you don't have one create one ) and match it with userid ; go to the security tab of that table and use (users can see and edit only their own records and use : users table :userid : Main Table : authority table : authority field. That will only show records that are setup on authority field that match the userid . Now if the user did not add that record and administrator did then , that field that matches the userid must match the authority field. So on admin security table ; need group for admin to see all records and group for users that can only see add/edit list print fields. of their own records . If you don't want them to add/edit records just check the group of users for list page.
This may seem a lot of work but now you can use this in all tables .