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>
有帮助吗?

解决方案

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.

Edit page definition PLSQL expression read only condition

apex_util.public_check_authorization documentation

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top