1 PACKAGE HR_SECURITY AS
2 /* $Header: hrscsec.pkh 120.2 2006/06/09 06:25:34 bshukla ship $ */
3 --
4 -- WARNING - ALL FUNCTIONS IN THIS PACKAGE MUST ASSERT AT LEAST WNPS
5 -- THIS IS DUE TO RDBMS LIMITATION 519783. The PRAGMA restrictions have
6 -- been removed as this is no longer required for Oracle 8i +.
7 --
8 --
9 -- Name
10 -- get_hr_security_context
11 -- Purpose
12 -- Returns the security_profile_id for the current session.
13 -- Previously this was stored in the client_info string but
14 -- is now stored as a global variable in the hr_security_package.
15 --
16 -- WARNING: HR DEVELOPMENT INTERNAL USE ONLY
17 --
18 -- Arguments
19 -- *none*
20 --
21 FUNCTION get_hr_security_context RETURN NUMBER ;
22 --
23 -- Name
24 -- get_security_profile
25 -- Purpose
26 -- Returns the security profile for the current user
27 -- The value is determined from the current schema as follows :
28 --
29 -- APPS schema :
30 -- An "APPS" schema is either universal,multi-currency or multi-lingual
31 -- If set, use security_profile_id set in the package global.
32 -- Otherwise use the value 0. This is the default view all security
33 -- profile
34 --
35 -- Read-only schema :
36 -- If the current schema is the reporting_oracle_username for an
37 -- existing security profile then return its id. If there is no such
38 -- profile then raise an error.
39 --
40 -- Custom schema :
41 -- A custom schema is one which not an APPS schema and not
42 -- oracle id. The function returns the seeded view all security profile
43 -- ie 0.
44 --
45 -- Arguments
46 -- *none*
47 --
48 FUNCTION get_security_profile RETURN NUMBER ;
49
50 --
51 -- Name
52 -- globals_need_refreshing
53 -- Purpose
54 -- Returns TRUE or FALSE depending on whether the HR globals
55 -- have become out-of-sync with the FND globals. This typically
56 -- occurs when a user changes responsibility.
57 --
58 FUNCTION globals_need_refreshing RETURN BOOLEAN;
59
60 --
61 -- Returns 'TRUE' if the record in the given table is accessible under
62 -- the current security context.
63 --
64 function show_record
65 (p_table_name in varchar2
66 ,p_unique_id in number
67 ,p_val1 in varchar2 default null
68 ,p_val2 in varchar2 default null
69 ,p_val3 in varchar2 default null
70 ,p_val4 in varchar2 default null
71 ,p_val5 in varchar2 default null
72 )
73 return varchar2 ;
74
75 --
76 -- (overloaded) show_person function to support npws.
77 --
78 FUNCTION show_person
79 (p_person_id IN NUMBER
80 ,p_current_applicant_flag IN VARCHAR2
81 ,p_current_employee_flag IN VARCHAR2
82 ,p_current_npw_flag IN VARCHAR2
83 ,p_employee_number IN VARCHAR2
84 ,p_applicant_number IN VARCHAR2
85 ,p_npw_number IN VARCHAR2)
86 Return VARCHAR2;
87 --
88 -- Under review
89 --
90 function view_all return varchar2 ;
91 --
92 -- Name
93 -- Show_BIS_Record
94 -- Purpose
95 -- Returns 'TRUE' if the record in the given table is accessible
96 -- under the current security context.
97 -- Arguments
98 -- p_org_id organization to which the record belongs
99 --
100 FUNCTION Show_BIS_Record
101 (p_org_id IN NUMBER
102 )
103 RETURN VARCHAR2;
104 --
105 --
106 -- Name
107 -- get_sec_profile_bg_id
108 -- Purpose
109 -- Returns the business_group_id value forthe current sessions security
110 -- profile held in g_context.
111 -- Arguments
112 -- none
113 --
114 FUNCTION get_sec_profile_bg_id RETURN NUMBER;
115 --
116 --
117 -- Name
118 -- get_person_id
119 -- Purpose
120 -- Returns the named_person_id value for the current sessions security
121 -- profile.
122 -- Arguments
123 -- none
124 --
125 FUNCTION get_person_id RETURN NUMBER;
126 --
127 PROCEDURE add_assignment(p_person_id number, p_assignment_id number);
128 --
129 PROCEDURE add_person(p_person_id number);
130 --
131 PROCEDURE remove_person(p_person_id number);
132 --
133 PROCEDURE add_organization(p_organization_id number,
134 p_security_profile_id number);
135 --
136 PROCEDURE add_position(p_position_id number,
137 p_security_profile_id number);
138 --
139 PROCEDURE add_payroll(p_payroll_id number);
140 --
141 FUNCTION restrict_on_individual_asg RETURN BOOLEAN;
142 --
143 FUNCTION restrict_by_supervisor_flag RETURN VARCHAR2;
144 --
145 PROCEDURE delete_list_for_bg(p_business_group_id NUMBER);
146 --
147 PROCEDURE delete_per_from_list(p_person_id number);
148 --
149 PROCEDURE delete_org_from_list(p_organization_id number);
150 --
151 PROCEDURE delete_pos_from_list(p_position_id number);
152 --
153 PROCEDURE delete_payroll_from_list(p_payroll_id number);
154 --
155 END HR_SECURITY;