Page 1 of 1

Lookup field (inherit permissions ) not working with custom query??

Posted: 2025-01-01 08:51
by xbox2007
hello
i use custom query with lookup filed

Code: Select all

SELECT `Employee`.`ID`, IF(CHAR_LENGTH(`Employee`.`Code`) || CHAR_LENGTH(`Employee`.`EmployeeName`), CONCAT_WS(\'\', `Employee`.`Code`, \' - \', `Employee`.`EmployeeName`), \'\') FROM `Employee` LEFT JOIN `Nationality` as Nationality1 ON `Nationality1`.`ID`=`Employee`.`Nationality` LEFT JOIN `Job_Title` as Job_Title1 ON `Job_Title1`.`ID`=`Employee`.`Job_Title` LEFT JOIN `Employee` as Employee1 ON `Employee1`.`ID`=`Employee`.`Supervisor` LEFT JOIN `Work` as Work1 ON `Work1`.`ID`=`Employee`.`Work_Status` LEFT JOIN `Status` as Status1 ON `Status1`.`ID`=`Employee`.`Status` LEFT JOIN `Sponsor` as Sponsor1 ON `Sponsor1`.`ID`=`Employee`.`S_Name` where `Employee`.`Active` ="Active" ORDER BY 2
i add this part to default query , to show only active user in table

Code: Select all

where `Employee`.`Active` ="Active"
but when check (Inherrit access Permissions) custom query work fine and show only active but user can see all record even he not onwer.
Screenshot 2025-01-01 114409.png
1
Screenshot 2025-01-01 114409.png (49.83 KiB) Viewed 7046 times
i would like use custom query and user can see owan receord only

thanks a lot