1 PACKAGE BODY JTY_USAGE_SEC_POLICY_PVT AS
2 /* $Header: jtfusgpb.pls 120.0 2005/10/21 09:25:32 jradhakr noship $ */
3
4 --
5 -- Name
6 -- get_usg_security
7 -- Purpose
8 -- This function implements the security policy for the territory usages
9 -- access control mechanism. It is automatically called by the oracle
10 -- server whenever a secured table or view is referenced by a SQL
11 -- statement. Products should not call this function directly.
12 --
13 -- The security policy function is expected to return a predicate
14 -- (a WHERE clause) that will control which records can be accessed
15 -- or modified by the SQL statement. After incorporating the
16 -- predicate, the server will parse, optimize and execute the
17 -- modified statement.
18 --
19 -- Arguments
20 -- table_alias - Alias being used for jtf_sources
21 --
22
23 FUNCTION get_usg_security ( obj_schema VARCHAR2,
24 obj_name VARCHAR2)
25 RETURN VARCHAR2 IS
26 l_where_clause VARCHAR2(1000);
27 l_status VARCHAR2(10);
28 l_sec_by_usgs_flag VARCHAR2(2);
29 BEGIN
30
31 fnd_data_security.get_security_predicate (
32 p_api_version => 1.0,
33 p_object_name => obj_name,
34 x_predicate => l_where_clause,
35 x_return_status => l_status);
36
37 RETURN l_where_clause;
38 END get_usg_security;
39
40 END JTY_USAGE_SEC_POLICY_PVT;