Hello,
I know that PHPRunner have features to manage users (only see his records, others users records, etc.), permissions, etc, but in my case only the admin can add records, so I cannot use that features.
The main table have a username field, so the admin can choose the user from de users table.
When a user login he can only see the records with his username. I've done that on the Before SQL Query, on the List page:
function BeforeQueryList($strSQL,$strWhereClause,$strOrderBy,$pageObject)
{
if ($_SESSION["username"] <> 'admin') {
$strWhereClause = whereAdd($strWhereClause, "clip_cliente= '".$_SESSION["username"]."'");
}
}
Everything is working just fine. The users can see only their records and the admin see all the records.
The problem is that when the user press the 'Print' (this page or all pages) he see all the records from others users.
How can I prevent that?
Thank you.