I use APEX 4.2.
I've an interactive report with this query:
select col1, col2, col3, col4
from MyTable
where function_check_user('ADMIN');
The function function_check_user() returns 1 if the user, who has the role 'ADMIN', can show the result of the query. I'm using the APEX procedure apex_util.public_check_authorization()
create or replace FUNCTION function_check_user
(
xrole VARCHAR2
)
return integer IS
xcheck BOOLEAN;
begin
xcheck:= apex_util.public_check_authorization(xrole);
if xcheck then
return 1;
end if;
return 0;
end;
Problem: I set up the inetractive report with the query and try to run it on my Application. I had this error:
Oracle Apex ORA-14551: cannot perform a DML operation inside a query tips.
It works when I use the query without the function in the where clause:
select col1, col2, col3, col4
from MyTable;
Is there an issue with the use of the procedure apex_util.public_check_authorization() ?
Thanks