One way to prevent this is to use views refering to application items. On the EMP table we create a view restricting it to one department:
create view emp_for_dept as select * from emp where deptno = v('APP_DEPTNO');
Outside of Apex this view will return no rows. Within an Apex application with the application item APP_DEPTNO set to 10, 20 or 30 the view will return the rows for that specific department. This way it is possible to limit the visible rows in a report.
It gets even better when we create the view with check option:
create view emp_for_dept as select * from emp where deptno = v('APP_DEPTNO') with check option;
The check option prevents rows to be inserted or updated, that do not comply with the where clause of the view. If you have a form based on this view, you cannot change the department. If you try to do so, you will get an error:
So in the case of the time registration system mentioned above the Apex application could be based on views limited by an application item. On logon this application item can be filled with the ID of the employee and she will only see her registrations. Moreover she can only enter new registrations that match the views selection criteria, so only for her own hours.
It is an elegant and easy way of solving a security issue.
Source Article from http://dickdral.blogspot.com/2016/05/using-views-with-check-option-in-apex.html