DBA Data[Home] [Help]

APPS.PA_SECURITY_PVT dependencies on FND_GRANTS

Line 469: from fnd_grants fg,

465: /* select 'Y'
466: from dual
467: where not exists
468: (select 'Y'
469: from fnd_grants fg,
470: fnd_objects obj
471: where fg.object_id=obj.object_id
472: and obj.obj_name=p_object_name
473: and fg.grantee_type='USER'

Line 477: ---we have not considered the instance sets in fnd_grants

473: and fg.grantee_type='USER'
474: and fg.grantee_key='PER:'||to_char(get_party_id)
475: and fg.instance_type='INSTANCE'
476: and fg.instance_pk1_value=p_object_key);
477: ---we have not considered the instance sets in fnd_grants
478: -- We may need to enhance this api to consider the instance sets
479: ---(right now we only have instance sets for project authority and
480: ----resource authority)*/
481:

Line 1042: l_grantee_key fnd_grants.grantee_key%TYPE;

1038:
1039: l_success varchar2(1);
1040: l_error_code number;
1041: l_instance_set_id number;
1042: l_grantee_key fnd_grants.grantee_key%TYPE;
1043: l_grant_exists VARCHAR2(1);
1044: l_status_level VARCHAR2(30);
1045: l_default_menu_name fnd_menus.menu_name%TYPE := null;
1046: l_status_type_tbl SYSTEM.pa_varchar2_30_tbl_type := null;

Line 1051: l_parameter2 fnd_grants.parameter2%TYPE;

1047: l_status_code_tbl SYSTEM.pa_varchar2_30_tbl_type := null;
1048: l_menu_name_tbl SYSTEM.pa_varchar2_30_tbl_type := null;
1049: l_exp_error varchar2(1) := 'F';
1050: l_unexp_error varchar2(1) := 'F';
1051: l_parameter2 fnd_grants.parameter2%TYPE;
1052: l_role_status_menu_id_tbl SYSTEM.pa_num_tbl_type := null;
1053: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1054: l_error_message_code VARCHAR2(30);
1055:

Line 1066: -- for role-based security, check to see the this person already has a FND_GRANTS

1062: x_msg_data:=null;
1063:
1064: l_grantee_key:=get_grantee_key(p_source_type, p_party_id, 'Y'); -- Added 'Y' parameter for bug 3471913
1065:
1066: -- for role-based security, check to see the this person already has a FND_GRANTS
1067: -- record for this given role. Only grant if person does not have such records.
1068: IF p_project_role_id IS NOT NULL AND p_object_name = 'PA_PROJECTS' THEN
1069: pa_security_pvt.check_grant_exists(p_project_role_id => p_project_role_id,
1070: p_instance_type => 'SET',

Line 1114: fnd_grants_pkg.grant_function

1110:
1111: --dbms_output.put_line('before calling grant_function');
1112: --dbms_output.put_line('l_grantee_key: '||l_grantee_key);
1113:
1114: fnd_grants_pkg.grant_function
1115: (
1116: p_api_version => l_api_version,
1117: p_menu_name => l_default_menu_name,
1118: p_object_name => 'PA_PROJECTS',

Line 1154: fnd_grants_pkg.grant_function

1150: FOR i IN l_status_code_tbl.FIRST .. l_status_code_tbl.LAST LOOP
1151:
1152: --dbms_output.put_line('status menu name: '||l_menu_name_tbl(i));
1153:
1154: fnd_grants_pkg.grant_function
1155: (
1156: p_api_version => l_api_version,
1157: p_menu_name => l_menu_name_tbl(i),
1158: p_object_name => 'PA_PROJECTS',

Line 1281: fnd_grants_pkg.grant_function

1277: l_instance_pk1_value:=null;
1278: l_object_key_type:='SET';
1279: end if;
1280:
1281: fnd_grants_pkg.grant_function
1282: (
1283: p_api_version =>l_api_version,
1284: p_menu_name =>v_menu_name,
1285: p_object_name =>p_object_name,

Line 1341: fnd_grants_pkg.revoke_grant

1337: x_return_status :=fnd_api.g_ret_sts_success;
1338: x_msg_count:=0;
1339: x_msg_data :=null;
1340: --dbms_output.put_line('inside pa revoke_grants');
1341: fnd_grants_pkg.revoke_grant
1342: (
1343: p_api_version =>l_api_version,
1344: p_grant_guid =>p_grant_guid,
1345: x_success =>l_success,

Line 1418: FROM fnd_grants

1414: SAVEPOINT revoke_role_PUB;
1415:
1416: SELECT grant_guid
1417: INTO l_grant_guid
1418: FROM fnd_grants
1419: WHERE grantee_type='USER' AND
1420: grantee_key=get_grantee_key(p_source_type, p_party_id) AND
1421: menu_id=l_menu_id AND
1422: object_id=l_object_id AND

Line 1429: fnd_grants_pkg.revoke_grant(

1425: instance_pk1_value=TO_CHAR(p_object_key)) OR
1426: (l_object_key_type='SET' AND
1427: instance_set_id=p_object_key));
1428:
1429: fnd_grants_pkg.revoke_grant(
1430: p_api_version => l_api_version,
1431: p_grant_guid => l_grant_guid,
1432: x_success => l_success,
1433: x_errorcode => l_error_code);

Line 1499: fnd_grants_pkg.update_grant

1495:
1496: x_return_status:=fnd_api.g_ret_sts_success;
1497: x_msg_count:=0;
1498: x_msg_data:=null;
1499: fnd_grants_pkg.update_grant
1500: (
1501: p_api_version =>l_api_version,
1502: p_grant_guid =>p_grant_guid,
1503: p_start_date =>p_start_date_new,

Line 1576: fnd_grants_pkg.lock_grant

1572: into l_object_id
1573: from fnd_objects
1574: where obj_name=p_object_name;
1575:
1576: fnd_grants_pkg.lock_grant
1577: (
1578: p_grant_guid =>p_grant_guid,
1579: p_menu_id =>v_menu_id,
1580: -- p_grantee_key =>'PER:'||to_char(p_party_id),

Line 1778: ,p_object_key_type IN FND_GRANTS.INSTANCE_TYPE%TYPE DEFAULT 'INSTANCE'

1774: -----FUNCTION is_role_exists-------------
1775: ----This FUnction is created by Hari. It is used in resource model
1776: --------------------------------------------------------------------------
1777: FUNCTION is_role_exists ( p_object_name IN FND_OBJECTS.OBJ_NAME%TYPE
1778: ,p_object_key_type IN FND_GRANTS.INSTANCE_TYPE%TYPE DEFAULT 'INSTANCE'
1779: ,p_role_id IN FND_MENUS.MENU_ID%TYPE
1780: ,p_object_key IN FND_GRANTS.INSTANCE_PK1_VALUE%TYPE
1781: ,p_party_id IN NUMBER
1782: ) RETURN BOOLEAN IS

Line 1780: ,p_object_key IN FND_GRANTS.INSTANCE_PK1_VALUE%TYPE

1776: --------------------------------------------------------------------------
1777: FUNCTION is_role_exists ( p_object_name IN FND_OBJECTS.OBJ_NAME%TYPE
1778: ,p_object_key_type IN FND_GRANTS.INSTANCE_TYPE%TYPE DEFAULT 'INSTANCE'
1779: ,p_role_id IN FND_MENUS.MENU_ID%TYPE
1780: ,p_object_key IN FND_GRANTS.INSTANCE_PK1_VALUE%TYPE
1781: ,p_party_id IN NUMBER
1782: ) RETURN BOOLEAN IS
1783:
1784: --l_yes CONSTANT BOOLEAN := TRUE;

Line 1788: l_grantee_key fnd_grants.grantee_key%TYPE := '';

1784: --l_yes CONSTANT BOOLEAN := TRUE;
1785: --l_exists_flag BOOLEAN DEFAULT FALSE;
1786: l_dummy VARCHAR2(1);
1787: l_object_key_type varchar2(8);
1788: l_grantee_key fnd_grants.grantee_key%TYPE := '';
1789:
1790: BEGIN
1791: if p_object_key_type='INSTANCE' then
1792: l_object_key_type:='INSTANCE';

Line 1825: FROM fnd_grants fg ,

1821: END IF;
1822:
1823: SELECT DISTINCT 'Y'
1824: INTO l_dummy
1825: FROM fnd_grants fg ,
1826: fnd_objects fo
1827: WHERE fg.object_id=fo.object_id
1828: AND fo.obj_name = p_object_name
1829: AND fg.INSTANCE_type = l_object_key_type

Line 2120: p_instance_type in fnd_grants.INSTANCE_TYPE%TYPE,

2116:
2117: END check_access_exist;
2118:
2119: PROCEDURE check_grant_exists(p_project_role_id in NUMBER,
2120: p_instance_type in fnd_grants.INSTANCE_TYPE%TYPE,
2121: p_instance_set_name in fnd_object_instance_sets.instance_set_name%TYPE,
2122: p_grantee_type in fnd_grants.GRANTEE_TYPE%TYPE,
2123: p_grantee_key in fnd_grants.GRANTEE_KEY%TYPE,
2124: x_instance_set_id out NOCOPY NUMBER, --File.Sql.39 bug 4440895

Line 2122: p_grantee_type in fnd_grants.GRANTEE_TYPE%TYPE,

2118:
2119: PROCEDURE check_grant_exists(p_project_role_id in NUMBER,
2120: p_instance_type in fnd_grants.INSTANCE_TYPE%TYPE,
2121: p_instance_set_name in fnd_object_instance_sets.instance_set_name%TYPE,
2122: p_grantee_type in fnd_grants.GRANTEE_TYPE%TYPE,
2123: p_grantee_key in fnd_grants.GRANTEE_KEY%TYPE,
2124: x_instance_set_id out NOCOPY NUMBER, --File.Sql.39 bug 4440895
2125: x_ret_code out NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2126: ) IS

Line 2123: p_grantee_key in fnd_grants.GRANTEE_KEY%TYPE,

2119: PROCEDURE check_grant_exists(p_project_role_id in NUMBER,
2120: p_instance_type in fnd_grants.INSTANCE_TYPE%TYPE,
2121: p_instance_set_name in fnd_object_instance_sets.instance_set_name%TYPE,
2122: p_grantee_type in fnd_grants.GRANTEE_TYPE%TYPE,
2123: p_grantee_key in fnd_grants.GRANTEE_KEY%TYPE,
2124: x_instance_set_id out NOCOPY NUMBER, --File.Sql.39 bug 4440895
2125: x_ret_code out NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2126: ) IS
2127:

Line 2144: from fnd_grants

2140: x_instance_set_id := G_project_roles_ins_set_id;
2141: END IF;
2142:
2143: select 'T' into l_grant_exists
2144: from fnd_grants
2145: where grantee_key = p_grantee_key
2146: and grantee_type = 'USER'
2147: and instance_set_id = l_instance_set_id
2148: and grantee_type = p_grantee_type

Line 2189: -- update menu_id in FND_GRANTS

2185: IF G_project_roles_ins_set_id IS NULL THEN
2186: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2187: END IF;
2188:
2189: -- update menu_id in FND_GRANTS
2190: UPDATE fnd_grants
2191: SET menu_id = p_menu_id
2192: WHERE parameter1 = to_char(p_project_role_id)
2193: AND (parameter2 = 'NON_STATUS_BASED' OR parameter2 = 'DEFAULT')

Line 2190: UPDATE fnd_grants

2186: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2187: END IF;
2188:
2189: -- update menu_id in FND_GRANTS
2190: UPDATE fnd_grants
2191: SET menu_id = p_menu_id
2192: WHERE parameter1 = to_char(p_project_role_id)
2193: AND (parameter2 = 'NON_STATUS_BASED' OR parameter2 = 'DEFAULT')
2194: AND instance_type = 'SET'

Line 2228: -- delete from FND_GRANTS

2224: IF G_project_roles_ins_set_id IS NULL THEN
2225: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2226: END IF;
2227:
2228: -- delete from FND_GRANTS
2229: DELETE FROM fnd_grants
2230: WHERE parameter1 = to_char(p_project_role_id)
2231: AND instance_type = 'SET'
2232: AND instance_set_id = G_project_roles_ins_set_id;

Line 2229: DELETE FROM fnd_grants

2225: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2226: END IF;
2227:
2228: -- delete from FND_GRANTS
2229: DELETE FROM fnd_grants
2230: WHERE parameter1 = to_char(p_project_role_id)
2231: AND instance_type = 'SET'
2232: AND instance_set_id = G_project_roles_ins_set_id;
2233:

Line 2261: l_grantee_key fnd_grants.grantee_key%TYPE;

2257:
2258: l_success varchar2(1);
2259: l_error_code number;
2260: l_instance_set_id number;
2261: l_grantee_key fnd_grants.grantee_key%TYPE;
2262: l_grant_exists VARCHAR2(1);
2263: l_status_level VARCHAR2(30);
2264: l_default_menu_name fnd_menus.menu_name%TYPE := null;
2265: l_status_type_tbl SYSTEM.pa_varchar2_30_tbl_type := null;

Line 2270: l_parameter2 fnd_grants.parameter2%TYPE;

2266: l_status_code_tbl SYSTEM.pa_varchar2_30_tbl_type := null;
2267: l_menu_name_tbl SYSTEM.pa_varchar2_30_tbl_type := null;
2268: l_exp_error varchar2(1) := 'F';
2269: l_unexp_error varchar2(1) := 'F';
2270: l_parameter2 fnd_grants.parameter2%TYPE;
2271: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
2272: l_error_message_code VARCHAR2(30);
2273: l_grant_guid fnd_grants.grant_guid%TYPE;
2274: l_role_status_menu_id_tbl SYSTEM.pa_num_tbl_type := null;

Line 2273: l_grant_guid fnd_grants.grant_guid%TYPE;

2269: l_unexp_error varchar2(1) := 'F';
2270: l_parameter2 fnd_grants.parameter2%TYPE;
2271: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
2272: l_error_message_code VARCHAR2(30);
2273: l_grant_guid fnd_grants.grant_guid%TYPE;
2274: l_role_status_menu_id_tbl SYSTEM.pa_num_tbl_type := null;
2275:
2276: cursor get_resources_on_role is
2277: select distinct ppp.resource_type_id,ppp.resource_source_id

Line 2329: -- insert records back to fnd_Grants

2325: ELSE
2326: l_parameter2 := 'DEFAULT';
2327: END IF;
2328:
2329: -- insert records back to fnd_Grants
2330: FOR res in get_resources_on_role LOOP
2331:
2332: IF res.resource_type_id = 112 THEN
2333: SELECT wfr.name grantee_key

Line 2355: -- insert new records into FND_GRANTS

2351:
2352: --dbms_output.put_line('------------------------------');
2353: --dbms_output.put_line('grantee_key: ' || l_grantee_key);
2354:
2355: -- insert new records into FND_GRANTS
2356: fnd_grants_pkg.grant_function
2357: (
2358: p_api_version => l_api_version, -- Modified the parameter from '1.0' to l_api_version: Bug #3983570
2359: p_menu_name => l_default_menu_name,

Line 2356: fnd_grants_pkg.grant_function

2352: --dbms_output.put_line('------------------------------');
2353: --dbms_output.put_line('grantee_key: ' || l_grantee_key);
2354:
2355: -- insert new records into FND_GRANTS
2356: fnd_grants_pkg.grant_function
2357: (
2358: p_api_version => l_api_version, -- Modified the parameter from '1.0' to l_api_version: Bug #3983570
2359: p_menu_name => l_default_menu_name,
2360: p_object_name => 'PA_PROJECTS',

Line 2392: fnd_grants_pkg.grant_function

2388: IF l_status_code_tbl IS NOT NULL AND l_status_code_tbl.COUNT > 0 THEN
2389:
2390: FOR i IN l_status_code_tbl.FIRST..l_status_code_tbl.LAST LOOP
2391:
2392: fnd_grants_pkg.grant_function
2393: (
2394: p_api_version => l_api_version, -- Modified the parameter from '1.0' to l_api_version: Bug #3983570
2395: p_menu_name => l_menu_name_tbl(i),
2396: p_object_name => 'PA_PROJECTS',

Line 2482: -- delete all but default from fnd_Grants

2478: IF G_project_roles_ins_set_id IS NULL THEN
2479: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2480: END IF;
2481:
2482: -- delete all but default from fnd_Grants
2483: DELETE FROM fnd_grants
2484: WHERE parameter1 = to_char(p_project_role_id)
2485: AND (parameter2 = 'USER' OR parameter2 = 'SYSTEM')
2486: AND instance_type = 'SET'

Line 2483: DELETE FROM fnd_grants

2479: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2480: END IF;
2481:
2482: -- delete all but default from fnd_Grants
2483: DELETE FROM fnd_grants
2484: WHERE parameter1 = to_char(p_project_role_id)
2485: AND (parameter2 = 'USER' OR parameter2 = 'SYSTEM')
2486: AND instance_type = 'SET'
2487: AND instance_set_id = G_project_roles_ins_set_id;

Line 2544: l_grantee_key fnd_grants.grantee_key%TYPE;

2540: and per.party_id = wfr.orig_system_id
2541: and wfr.orig_system = 'HZ_PARTY';
2542:
2543:
2544: l_grantee_key fnd_grants.grantee_key%TYPE;
2545: l_status_menu_count NUMBER := 0;
2546: l_parameter2 fnd_grants.parameter2%TYPE;
2547: l_opp_param2 fnd_grants.parameter2%TYPE;
2548: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

Line 2546: l_parameter2 fnd_grants.parameter2%TYPE;

2542:
2543:
2544: l_grantee_key fnd_grants.grantee_key%TYPE;
2545: l_status_menu_count NUMBER := 0;
2546: l_parameter2 fnd_grants.parameter2%TYPE;
2547: l_opp_param2 fnd_grants.parameter2%TYPE;
2548: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2549: l_grant_guid fnd_grants.grant_guid%TYPE;
2550: l_success varchar2(1);

Line 2547: l_opp_param2 fnd_grants.parameter2%TYPE;

2543:
2544: l_grantee_key fnd_grants.grantee_key%TYPE;
2545: l_status_menu_count NUMBER := 0;
2546: l_parameter2 fnd_grants.parameter2%TYPE;
2547: l_opp_param2 fnd_grants.parameter2%TYPE;
2548: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2549: l_grant_guid fnd_grants.grant_guid%TYPE;
2550: l_success varchar2(1);
2551: l_exp_error varchar2(1);

Line 2549: l_grant_guid fnd_grants.grant_guid%TYPE;

2545: l_status_menu_count NUMBER := 0;
2546: l_parameter2 fnd_grants.parameter2%TYPE;
2547: l_opp_param2 fnd_grants.parameter2%TYPE;
2548: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2549: l_grant_guid fnd_grants.grant_guid%TYPE;
2550: l_success varchar2(1);
2551: l_exp_error varchar2(1);
2552: l_unexp_error varchar2(1);
2553: l_error_code number;

Line 2561: -- 1. NEW: insert new records into FND_GRANTS

2557: IF G_project_roles_ins_set_id IS NULL THEN
2558: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2559: END IF;
2560:
2561: -- 1. NEW: insert new records into FND_GRANTS
2562: IF p_new_status_code_tbl IS NOT NULL AND p_new_status_code_tbl.COUNT > 0 THEN
2563:
2564: --dbms_output.put_line('insert new record');
2565:

Line 2572: fnd_grants_pkg.grant_function

2568: l_grantee_key := res.grantee_key;
2569:
2570: FOR i IN p_new_status_code_tbl.FIRST..p_new_status_code_tbl.LAST LOOP
2571:
2572: fnd_grants_pkg.grant_function
2573: (
2574: p_api_version => l_api_version, -- Modified the parameter from '1.0' to l_api_version: Bug #3983570
2575: p_menu_name => p_new_menu_name_tbl(i),
2576: p_object_name => 'PA_PROJECTS',

Line 2620: -- 2. delete obsolete records from FND_GRANTS

2616: END IF; -- p_new_status_code_tbl.COUNT > 0 THEN
2617:
2618: IF l_return_status = fnd_api.g_ret_sts_success THEN
2619:
2620: -- 2. delete obsolete records from FND_GRANTS
2621: IF p_del_status_code_tbl IS NOT NULL AND p_del_status_code_tbl.COUNT > 0 THEN
2622:
2623: --dbms_output.put_line('delete records');
2624:

Line 2626: DELETE FROM fnd_grants

2622:
2623: --dbms_output.put_line('delete records');
2624:
2625: FORALL j in p_del_status_code_tbl.FIRST..p_del_status_code_tbl.LAST
2626: DELETE FROM fnd_grants
2627: WHERE parameter1 = to_char(p_project_role_id)
2628: AND (parameter2 = 'USER' OR parameter2 = 'SYSTEM')
2629: AND parameter3 = p_del_status_code_tbl(j)
2630: AND parameter4 = p_del_role_sts_menu_id_tbl(j)

Line 2636: -- 3. update existing records in FND_GRANTS

2632: AND instance_set_id = G_project_roles_ins_set_id;
2633:
2634: END IF;
2635:
2636: -- 3. update existing records in FND_GRANTS
2637: IF p_mod_status_code_tbl IS NOT NULL AND p_mod_status_code_tbl.COUNT > 0 THEN
2638:
2639: --dbms_output.put_line('update records');
2640:

Line 2642: UPDATE fnd_grants

2638:
2639: --dbms_output.put_line('update records');
2640:
2641: FORALL k in p_mod_status_code_tbl.FIRST..p_mod_status_code_tbl.LAST
2642: UPDATE fnd_grants
2643: SET parameter2 = p_status_level,
2644: parameter3 = p_mod_status_code_tbl(k),
2645: menu_id = p_mod_menu_id_tbl(k)
2646: WHERE parameter1 = to_char(p_project_role_id)

Line 2654: -- set the fnd_grants records from DEFAULT to NON_STATUS_BASED

2650: AND instance_set_id = G_project_roles_ins_set_id;
2651: END IF;
2652:
2653: -- 4. if there is no status-menu record for the role,
2654: -- set the fnd_grants records from DEFAULT to NON_STATUS_BASED
2655: select count(role_status_menu_id) into l_status_menu_count
2656: from pa_role_status_menu_map
2657: where role_id = p_project_role_id
2658: and rownum=1;

Line 2668: UPDATE fnd_grants

2664: l_parameter2 := 'DEFAULT';
2665: l_opp_param2 := 'NON_STATUS_BASED';
2666: END IF;
2667:
2668: UPDATE fnd_grants
2669: SET parameter2 = l_parameter2
2670: WHERE parameter1 = to_char(p_project_role_id)
2671: AND parameter2 = l_opp_param2
2672: AND instance_type = 'SET'