DBA Data[Home] [Help]

PACKAGE: APPS.FND_SEC_BULK

Source


1 package FND_SEC_BULK AUTHID CURRENT_USER as
2 /* $Header: AFSCBLKS.pls 115.8 2003/12/04 19:10:07 pdeluna noship $ */
3 
4 
5 --------------------------------------------------------------------------
6 -- AddRespUserGroup
7 --   Assign a responsibility key to a group of users.
8 --   The group of users is defined in x_user_group_clause.
9 --   You can optionally supply description, start_date and end_date.
10 --   The return value is the number of users processed.
11 --
12 -- Usage Example
13 --   declare
14 --     user_clause varchar2(2000);
15 --     cnt number;
16 --   begin
17 --     user_clause := fnd_sec_bulk.UserAssignResp('FND',
18 --                                                'SYSTEM_ADMINISTRATOR',
19 --                                                'STANDARD');
20 --     cnt:= fnd_sec_bulk.AddRespUserGroup(user_clause,
21 --                                   'FND',
22 --                                   'SYSTEM_ADMINISTRATOR_GUI',
23 --                                   '',
24 --                                   'New SYSADMIN responsibility');
25 -- OR  cnt:= fnd_sec_bulk.AddRespUserGroup(user_clause,
26 --                                   'FND',
27 --                                   'SYSTEM_ADMINISTRATOR_GUI');
28 --   end;
29 --
30 -- Input Arguments
31 --   x_user_group_clause:  A sql statement returns all user's user_id
32 --                         For example, "select user_id from fnd_user where..."
33 --   x_resp_application:   Responsibility application short name
34 --   x_responsibility:     Responsibility key
35 --   x_security_group:     Security Group. Default is null.
36 --                         If x_user_group_clause is provided from calling
37 --                         UserAssignResp(), then DO NOT pass in
38 --                         x_security_group.
39 --                         If x_user_group_clause is provided by yourself,
40 --                         then you SHOULD input the x_security_group.
41 --   x_description:        Description
42 --   x_start_date:         Start date
43 --   x_end_date:           End date
44 
45 function AddRespUserGroup(
46   x_user_group_clause          in varchar2,
47   x_resp_application           in varchar2,
48   x_responsibility             in varchar2,
49   x_security_group             in varchar2 default '',
50   x_description                in varchar2 default '',
51   x_start_date                 in date default sysdate,
52   x_end_date                   in date default null) return number;
53 
54 --------------------------------------------------------------------------
55 -- AddRespIdUserGroup
56 --   Assign a responsibility which identified by ID to a group of users.
57 --   The group of users is defined in x_user_group_clause.
58 --   You can optionally supply description, start_date and end_date.
59 --   The return value is the number of users processed.
60 --
61 -- Usage Example
62 --   declare
63 --     user_clause varchar2(2000);
64 --   begin
65 --     user_clause := fnd_sec_bulk.UserAssignRespId(0, 101, 'STANDARD');
66 --     cnt :=  fnd_sec_bulk.AddRespIdUserGroup(user_clause, 0, 20420);
67 --   end;
68 --
69 -- Input Arguments
70 --   x_user_group_clause:  A sql statement returns all user's user_id
71 --                         For example, "select user_id from fnd_user where..."
72 --   x_resp_application_id:Responsibility application id
73 --   x_responsibility_id:  Responsibility id
74 --   x_security_group:     Security Group. Default is null.
75 --                         If x_user_group_clause is provided from calling
76 --                         UserAssignRespId(), then DO NOT pass in
77 --                         x_security_group.
78 --                         If x_user_group_clause is provided by yourself,
79 --                         then you SHOULD input the x_security_group.
80 --   x_description:        Description
81 --   x_start_date:         Start date
82 --   x_end_date:           End date
83 
84 function AddRespIdUserGroup(
85   x_user_group_clause          in varchar2,
86   x_resp_application_id        in number,
87   x_responsibility_id          in number,
88   x_security_group             in varchar2 default '',
89   x_description                in varchar2 default '',
90   x_start_date                 in date default sysdate,
91   x_end_date                   in date default null) return number;
92 
93 
94 --------------------------------------------------------------------------
95 -- UserAssignResp
96 --   Find all the users that have this given responsibility key and
97 --   security group pair.
98 --   Construct a full qualified sql statement to return all the user_ids.
99 --   So that this kind of sql statement can be used when calling
100 --   AddRespUserGroup().
101 -- Usage Example
102 --   declare
103 --     user_clause varchar2(2000);
104 --     cnt number;
105 --   begin
106 --     user_clause := fnd_sec_bulk.UserAssignResp('FND',
107 --                                                'SYSTEM_ADMINISTRATOR',
108 --                                                'STANDARD');
109 --     cnt := fnd_sec_bulk.AddRespUserGroup(user_clause,
110 --                                   'FND',
111 --                                   'SYSTEM_ADMINISTRATOR_GUI');
112 --   end;
113 -- Input Arguments
114 --   x_resp_application:   Responsibility application short name
115 --   x_responsibility:     Responsibility key
116 --   x_security_group:     Responsibility security group name
117 
118 function UserAssignResp(
119   x_resp_application          in varchar2,
120   x_responsibility            in varchar2,
121   x_security_group            in varchar2 default 'STANDARD')
122   return varchar2;
123 
124 --------------------------------------------------------------------------
125 -- UserAssignRespId
126 --   Find all the users that have this given responsibility identified by ID
127 --   and security group pair.
128 --   Construct a full qualified sql statement to return all the user_ids.
129 --   So that this kind of sql statement can be used when calling
130 --   AddRespUserGroup().
131 -- Usage Example
132 --   declare
133 --     user_clause varchar2(2000);
134 --     cnt number;
135 --   begin
136 --     user_clause := fnd_sec_bulk.UserAssignRespId(0,101, 'STANDARD');
137 --
138 --     cnt := fnd_sec_bulk.AddRespIdUserGroup(user_clause, 0, 20420);
139 --   end;
140 -- Input Arguments
141 --   x_resp_application_id:Responsibility application id
142 --   x_responsibility_id:  Responsibility id
143 --   x_security_group:     Responsibility security group name
144 
145 function UserAssignRespId(
146   x_resp_application_id       in number,
147   x_responsibility_id         in number,
148   x_security_group            in varchar2 default 'STANDARD')
149   return varchar2;
150 
151 
152 --------------------------------------------------------------------------
153 -- UpdateUserGroup
154 --   Update some of user attributes for a group of users.
155 --   Non-specified attribute is treated as taking the current
156 --   default value.
157 --   The group of users is defined in x_user_group_clause which is a full
158 --   qualified "select" sql statement.
159 --
160 -- Input Arguments
161 --   x_user_group_clause:  A sql statement returns all user's user_id
162 --                         For example, "select user_id from fnd_user where..."
163 --   x_start_date:         Start date
164 --   x_end_date:           End date
165 --   x_description:        User Description
166 --   x_password_lifespan_access: To control password expiration
167 --   x_password_lifespan_days:  To  control password expiration
168 --   x_email_address:      User email address
169 --   x_fax:                User fax number
170 
171 procedure UpdateUserGroup(
172   x_user_group_clause          in varchar2,
173   x_start_date                 in date default null,
174   x_end_date                   in date default null,
175   x_description                in varchar2 default null,
176   x_password_lifespan_accesses in number default null,
177   x_password_lifespan_days     in number default null,
178   x_email_address              in varchar2 default null,
179   x_fax	                       in varchar2 default null);
180 
181 
182 --------------------------------------------------------------------------
183 -- UpdateUserGroupTemplate
184 --   Update a group of users to have the same privileges as the given
185 --   template user. Supported privileges are user attributes, assigned
186 --   responsibilities and profiles.
187 --   The group of users is defined in x_user_group_clause.
188 --   You can optionally choose to clone all user attributes, all
189 --   responsibilities or all profile options.
190 --
191 -- Usage Example
192 --   declare
193 --     user_clause varchar2(2000);
194 --   begin
195 --     user_clause := fnd_sec_bulk.UserAssignResp('FND',
196 --                                             'ASSISTANT_SYSTEM_ADMINISTRATOR',
197 --                                                'STANDARD');
198 --     /* This will give all users SYSADMIN's's profile but not */
199 --     /* responsibilities and other attributes. */
200 --     fnd_sec_bulk.UpdateUserGroupTemplate(user_clause,
201 --                                          'SYSADMIN',
202 --                                          FALSE, FALSE, TRUE);
203 --   end;
204 --
205 -- Input Arguments
206 --   x_user_group_clause:  A select sql statement returns all user's user_id
207 --                         For example, "select user_id from fnd_user where..."
208 --   x_template_user:      The user name that you are going to clone from
209 --   x_attribute_flag:     Whether to clone user attributes
210 --   x_responsibility_flag:Whether to clone responsibility
211 --   x_profile_flag:       Whether to clone profile
212 
213 procedure UpdateUserGroupTemplate(
214   x_user_group_clause    in varchar2,
215   x_template_user              in varchar2,
216   x_attribute_flag             in boolean default TRUE,
217   x_responsibility_flag        in boolean default TRUE,
218   x_profile_flag               in boolean default TRUE);
219 
220 
221 end FND_SEC_BULK;