This topic is locked
[SOLVED]

 how to prevent direct access to detail table list page?

9/9/2016 9:08:40 AM
PHPRunner General questions
romaldus author

[size="2"]in detail table i already add some custom code ( in after record processed and before display event) to hide edit_link or buttons based on a value in master table. It works perfectly in master detail mode. [/size]

[size="2"]The problem is: User can access the list page of detail table /size directly[size="2"] from browser address bar and bypass all restrictions in custom code (since custom codes depends on a value in master table). [/size]

romaldus author 9/9/2016

solved
In detail Table (List Page, Before Display Event) :

// read data from master table and save it in session variable

$data = $pageObject->getMasterRecord();

$_SESSION["flight_info"]=$data["flight_number"];
// if no data / no master table detected, redirect to menu page

if(empty($_SESSION["flight_info"]))

{

header("Location: menu.php");

exit();

};