1 PACKAGE jtf_auth_security_pkg AUTHID CURRENT_USER AS
2 /* $Header: JTFSEASS.pls 120.2 2005/10/25 05:01:37 psanyal ship $ */
3
4 /* API name : CHECK_PERMISSION
5 * Type : Public
6 * Function : Checks if the user has the given permission or not
7 * This API is NOT to be used for access control, i.e.,
8 * you should not use this API to determine if the "current
9 * user" has a permission to access a form for example.
10 * Instead this should ONLY be used if "another user" is
11 * assigned a permission or not. You should rely on function
12 * security for access control. If you rely on this API to
13 * control access for a "current user", you will get erroneous
14 * results in maintenance mode. See bug # 2117260 for details.
15 *
16 * Parameters :
17 *
18 * OUT :
19 *
20 * X_RETURN_STATUS :
21 * holds the status of the procedure call, its value is
22 * FND_API.G_RET_STS_SUCCESS when the API completes successfully.
23 * FND_API.G_RET_STS_UNEXP_ERROR when the API encounters an unexpected
24 * error, in which case X_FLAG is undefined.
25 *
26 * X_FLAG :
27 * 1 if the user has the permission, 0 otherwise
28 *
29 * IN :
30 *
31 * USER_NAME :
32 * user name (case insensitive, lower case is converted to upper case)
33 *
34 * DOMAIN_NAME :
35 * domain name (case insensitive, lower case is converted to upper case.
36 * Defaults to "CRM_DOMAIN")
37 *
38 * PERMISSION_NAME :
39 * permission name (case sensitive)
40 */
41
42 PROCEDURE check_permission (
43 x_flag OUT NOCOPY /* file.sql.39 change */ NUMBER,
44 x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
45 p_user_name IN VARCHAR2,
46 p_domain_name IN VARCHAR2 DEFAULT 'CRM_DOMAIN',
47 p_permission_name IN VARCHAR2
48 );
49
50
51
52 /* assign_perm: assigns an existing permission to an existing role
53 *
54 * ROLE_NAME role name (case insensitive, lower case is converted
55 * to upper case)
56 * PERM_NAME permission name (case sensitive)
57 * APP_ID application id
58 */
59
60 procedure assign_perm (
61 ROLE_NAME in VARCHAR2,
62 PERM_NAME in VARCHAR2,
63 APP_ID in NUMBER
64 );
65
66
67 END jtf_auth_security_pkg;