Reputation: 1
I am using Apex Application, I need to show data depending on the username that is logged in. I have created roles, but I want to only show the data depending on the patient. For example: A patient wants to see his personal data and not all the data of other patients, is this possible to do with PL/SQL?
Upvotes: 0
Views: 120
Reputation: 18630
You can use the variable APP_USER for that. It contains the username of the logged on user. If the page is public then APP_USER will have value "nobody". Example:
SELECT <columns>
FROM <table>
WHERE username = :APP_USER;
Note that for sensitive data you might want to look at more robust ways of security your data, like VPD. That also can be used with apex. Rgds Koen
Upvotes: 1