Reputation: 1400
I have an Oracle APEX program where I need to determine if the current user fits within a given authorization scheme at run time. There are multiple schemes in the application and on a certain page, three have access to see it. Two of them have full read-write access to the fields displayed, while users from the other one have read-only privileges to the page.
How can I determine the user's scheme?
I am using Application Express 4.2.3.00.08.
Once I do that, I plan to do something like this in the page footer:
<script>
if ( '&NAME_OF_SCHEMA.' == 'DLR_READ_ONLY') {
$('input[type="text"]').attr('readonly','readonly');
}
</script>
Upvotes: 1
Views: 2619
Reputation: 7028
Probably the easiest route is to check the scheme in the read-only attribute of the page instead of relying on javascript. This will render all elements in read-only on your page, as if you'd set the region or item level read-only attribute.
apex_util.public_check_authorization documentation
Upvotes: 2