|
|
| |
 |
|
Oracle Tips by Burleson |
Chapter 5 Oracle Virtual Private Database
select provider_id
from claim_provider_policy
where username in (
sys_context('claim_app_ctx',
'app_user_id'),
user)
and access_type = 'INSERT'
) loop
l_ret := l_ret||','||prov_rec.provider_id;
end loop;
l_ret := ltrim(l_ret,',');
l_ret := 'PROVIDER_ID IN ('||l_ret ||')';
if l_ret = 'PROVIDER_ID IN ()' then
l_ret := '1=1';
end if;
end if;
return l_ret;
end;
/
-
Then create the update policy function.
update_auth_claims.sql
--**********************************************
--
-- Copyright © 2003 by Rampant TechPress Inc.
--
-- Free for non-commercial use.
-- For commercial licensing, e-mail info@rampant.cc
--
-- *********************************************
create or
replace function update_auth_claims
(
p_schema_name in varchar2,
The above text is
an excerpt from:
Oracle Privacy Security Auditing
The
Final Word on Oracle Security
This is the only authoritative
book on Oracle Security, Oracle Privacy, and Oracle Auditing written
by two of the world’s leading Oracle Security experts.
This indispensable book is only $39.95 and has an
immediate download of working security scripts:
http://rampant-books.com/book_2003_2_audit.htm
|
|
|