DBA Data[Home] [Help]

APPS.PA_SECURITY_PVT dependencies on FND_GRANTS

Line 479: from fnd_grants fg,

475: /* select 'Y'
476: from dual
477: where not exists
478: (select 'Y'
479: from fnd_grants fg,
480: fnd_objects obj
481: where fg.object_id=obj.object_id
482: and obj.obj_name=p_object_name
483: and fg.grantee_type='USER'

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

483: and fg.grantee_type='USER'
484: and fg.grantee_key='PER:'||to_char(get_party_id)
485: and fg.instance_type='INSTANCE'
486: and fg.instance_pk1_value=p_object_key);
487: ---we have not considered the instance sets in fnd_grants
488: -- We may need to enhance this api to consider the instance sets
489: ---(right now we only have instance sets for project authority and
490: ----resource authority)*/
491:

Line 1053: l_grantee_key fnd_grants.grantee_key%TYPE;

1049:
1050: l_success varchar2(1);
1051: l_error_code number;
1052: l_instance_set_id number;
1053: l_grantee_key fnd_grants.grantee_key%TYPE;
1054: l_grant_exists VARCHAR2(1);
1055: l_status_level VARCHAR2(30);
1056: l_default_menu_name fnd_menus.menu_name%TYPE := null;
1057: l_status_type_tbl SYSTEM.pa_varchar2_30_tbl_type := null;

Line 1062: l_parameter2 fnd_grants.parameter2%TYPE;

1058: l_status_code_tbl SYSTEM.pa_varchar2_30_tbl_type := null;
1059: l_menu_name_tbl SYSTEM.pa_varchar2_30_tbl_type := null;
1060: l_exp_error varchar2(1) := 'F';
1061: l_unexp_error varchar2(1) := 'F';
1062: l_parameter2 fnd_grants.parameter2%TYPE;
1063: l_role_status_menu_id_tbl SYSTEM.pa_num_tbl_type := null;
1064: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1065: l_error_message_code VARCHAR2(30);
1066:

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

1073: x_msg_data:=null;
1074:
1075: l_grantee_key:=get_grantee_key(p_source_type, p_party_id, 'Y'); -- Added 'Y' parameter for bug 3471913
1076:
1077: -- for role-based security, check to see the this person already has a FND_GRANTS
1078: -- record for this given role. Only grant if person does not have such records.
1079: IF p_project_role_id IS NOT NULL AND p_object_name = 'PA_PROJECTS' THEN
1080: pa_security_pvt.check_grant_exists(p_project_role_id => p_project_role_id,
1081: p_instance_type => 'SET',

Line 1125: fnd_grants_pkg.grant_function

1121:
1122: --dbms_output.put_line('before calling grant_function');
1123: --dbms_output.put_line('l_grantee_key: '||l_grantee_key);
1124:
1125: fnd_grants_pkg.grant_function
1126: (
1127: p_api_version => l_api_version,
1128: p_menu_name => l_default_menu_name,
1129: p_object_name => 'PA_PROJECTS',

Line 1165: fnd_grants_pkg.grant_function

1161: FOR i IN l_status_code_tbl.FIRST .. l_status_code_tbl.LAST LOOP
1162:
1163: --dbms_output.put_line('status menu name: '||l_menu_name_tbl(i));
1164:
1165: fnd_grants_pkg.grant_function
1166: (
1167: p_api_version => l_api_version,
1168: p_menu_name => l_menu_name_tbl(i),
1169: p_object_name => 'PA_PROJECTS',

Line 1292: fnd_grants_pkg.grant_function

1288: l_instance_pk1_value:=null;
1289: l_object_key_type:='SET';
1290: end if;
1291:
1292: fnd_grants_pkg.grant_function
1293: (
1294: p_api_version =>l_api_version,
1295: p_menu_name =>v_menu_name,
1296: p_object_name =>p_object_name,

Line 1352: fnd_grants_pkg.revoke_grant

1348: x_return_status :=fnd_api.g_ret_sts_success;
1349: x_msg_count:=0;
1350: x_msg_data :=null;
1351: --dbms_output.put_line('inside pa revoke_grants');
1352: fnd_grants_pkg.revoke_grant
1353: (
1354: p_api_version =>l_api_version,
1355: p_grant_guid =>p_grant_guid,
1356: x_success =>l_success,

Line 1429: FROM fnd_grants

1425: SAVEPOINT revoke_role_PUB;
1426:
1427: SELECT grant_guid
1428: INTO l_grant_guid
1429: FROM fnd_grants
1430: WHERE grantee_type='USER' AND
1431: grantee_key=get_grantee_key(p_source_type, p_party_id) AND
1432: menu_id=l_menu_id AND
1433: object_id=l_object_id AND

Line 1440: fnd_grants_pkg.revoke_grant(

1436: instance_pk1_value=TO_CHAR(p_object_key)) OR
1437: (l_object_key_type='SET' AND
1438: instance_set_id=p_object_key));
1439:
1440: fnd_grants_pkg.revoke_grant(
1441: p_api_version => l_api_version,
1442: p_grant_guid => l_grant_guid,
1443: x_success => l_success,
1444: x_errorcode => l_error_code);

Line 1510: fnd_grants_pkg.update_grant

1506:
1507: x_return_status:=fnd_api.g_ret_sts_success;
1508: x_msg_count:=0;
1509: x_msg_data:=null;
1510: fnd_grants_pkg.update_grant
1511: (
1512: p_api_version =>l_api_version,
1513: p_grant_guid =>p_grant_guid,
1514: p_start_date =>p_start_date_new,

Line 1587: fnd_grants_pkg.lock_grant

1583: into l_object_id
1584: from fnd_objects
1585: where obj_name=p_object_name;
1586:
1587: fnd_grants_pkg.lock_grant
1588: (
1589: p_grant_guid =>p_grant_guid,
1590: p_menu_id =>v_menu_id,
1591: -- p_grantee_key =>'PER:'||to_char(p_party_id),

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

1785: -----FUNCTION is_role_exists-------------
1786: ----This FUnction is created by Hari. It is used in resource model
1787: --------------------------------------------------------------------------
1788: FUNCTION is_role_exists ( p_object_name IN FND_OBJECTS.OBJ_NAME%TYPE
1789: ,p_object_key_type IN FND_GRANTS.INSTANCE_TYPE%TYPE DEFAULT 'INSTANCE'
1790: ,p_role_id IN FND_MENUS.MENU_ID%TYPE
1791: ,p_object_key IN FND_GRANTS.INSTANCE_PK1_VALUE%TYPE
1792: ,p_party_id IN NUMBER
1793: ) RETURN BOOLEAN IS

Line 1791: ,p_object_key IN FND_GRANTS.INSTANCE_PK1_VALUE%TYPE

1787: --------------------------------------------------------------------------
1788: FUNCTION is_role_exists ( p_object_name IN FND_OBJECTS.OBJ_NAME%TYPE
1789: ,p_object_key_type IN FND_GRANTS.INSTANCE_TYPE%TYPE DEFAULT 'INSTANCE'
1790: ,p_role_id IN FND_MENUS.MENU_ID%TYPE
1791: ,p_object_key IN FND_GRANTS.INSTANCE_PK1_VALUE%TYPE
1792: ,p_party_id IN NUMBER
1793: ) RETURN BOOLEAN IS
1794:
1795: --l_yes CONSTANT BOOLEAN := TRUE;

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

1795: --l_yes CONSTANT BOOLEAN := TRUE;
1796: --l_exists_flag BOOLEAN DEFAULT FALSE;
1797: l_dummy VARCHAR2(1);
1798: l_object_key_type varchar2(8);
1799: l_grantee_key fnd_grants.grantee_key%TYPE := '';
1800:
1801: BEGIN
1802: if p_object_key_type='INSTANCE' then
1803: l_object_key_type:='INSTANCE';

Line 1836: FROM fnd_grants fg ,

1832: END IF;
1833:
1834: SELECT DISTINCT 'Y'
1835: INTO l_dummy
1836: FROM fnd_grants fg ,
1837: fnd_objects fo
1838: WHERE fg.object_id=fo.object_id
1839: AND fo.obj_name = p_object_name
1840: AND fg.INSTANCE_type = l_object_key_type

Line 2131: p_instance_type in fnd_grants.INSTANCE_TYPE%TYPE,

2127:
2128: END check_access_exist;
2129:
2130: PROCEDURE check_grant_exists(p_project_role_id in NUMBER,
2131: p_instance_type in fnd_grants.INSTANCE_TYPE%TYPE,
2132: p_instance_set_name in fnd_object_instance_sets.instance_set_name%TYPE,
2133: p_grantee_type in fnd_grants.GRANTEE_TYPE%TYPE,
2134: p_grantee_key in fnd_grants.GRANTEE_KEY%TYPE,
2135: x_instance_set_id out NOCOPY NUMBER, --File.Sql.39 bug 4440895

Line 2133: p_grantee_type in fnd_grants.GRANTEE_TYPE%TYPE,

2129:
2130: PROCEDURE check_grant_exists(p_project_role_id in NUMBER,
2131: p_instance_type in fnd_grants.INSTANCE_TYPE%TYPE,
2132: p_instance_set_name in fnd_object_instance_sets.instance_set_name%TYPE,
2133: p_grantee_type in fnd_grants.GRANTEE_TYPE%TYPE,
2134: p_grantee_key in fnd_grants.GRANTEE_KEY%TYPE,
2135: x_instance_set_id out NOCOPY NUMBER, --File.Sql.39 bug 4440895
2136: x_ret_code out NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2137: ) IS

Line 2134: p_grantee_key in fnd_grants.GRANTEE_KEY%TYPE,

2130: PROCEDURE check_grant_exists(p_project_role_id in NUMBER,
2131: p_instance_type in fnd_grants.INSTANCE_TYPE%TYPE,
2132: p_instance_set_name in fnd_object_instance_sets.instance_set_name%TYPE,
2133: p_grantee_type in fnd_grants.GRANTEE_TYPE%TYPE,
2134: p_grantee_key in fnd_grants.GRANTEE_KEY%TYPE,
2135: x_instance_set_id out NOCOPY NUMBER, --File.Sql.39 bug 4440895
2136: x_ret_code out NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2137: ) IS
2138:

Line 2155: from fnd_grants

2151: x_instance_set_id := G_project_roles_ins_set_id;
2152: END IF;
2153:
2154: select 'T' into l_grant_exists
2155: from fnd_grants
2156: where grantee_key = p_grantee_key
2157: and grantee_type = 'USER'
2158: and instance_set_id = l_instance_set_id
2159: and grantee_type = p_grantee_type

Line 2200: -- update menu_id in FND_GRANTS

2196: IF G_project_roles_ins_set_id IS NULL THEN
2197: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2198: END IF;
2199:
2200: -- update menu_id in FND_GRANTS
2201: UPDATE fnd_grants
2202: SET menu_id = p_menu_id
2203: WHERE parameter1 = to_char(p_project_role_id)
2204: AND (parameter2 = 'NON_STATUS_BASED' OR parameter2 = 'DEFAULT')

Line 2201: UPDATE fnd_grants

2197: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2198: END IF;
2199:
2200: -- update menu_id in FND_GRANTS
2201: UPDATE fnd_grants
2202: SET menu_id = p_menu_id
2203: WHERE parameter1 = to_char(p_project_role_id)
2204: AND (parameter2 = 'NON_STATUS_BASED' OR parameter2 = 'DEFAULT')
2205: AND instance_type = 'SET'

Line 2239: -- delete from FND_GRANTS

2235: IF G_project_roles_ins_set_id IS NULL THEN
2236: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2237: END IF;
2238:
2239: -- delete from FND_GRANTS
2240: DELETE FROM fnd_grants
2241: WHERE parameter1 = to_char(p_project_role_id)
2242: AND instance_type = 'SET'
2243: AND instance_set_id = G_project_roles_ins_set_id;

Line 2240: DELETE FROM fnd_grants

2236: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2237: END IF;
2238:
2239: -- delete from FND_GRANTS
2240: DELETE FROM fnd_grants
2241: WHERE parameter1 = to_char(p_project_role_id)
2242: AND instance_type = 'SET'
2243: AND instance_set_id = G_project_roles_ins_set_id;
2244:

Line 2272: l_grantee_key fnd_grants.grantee_key%TYPE;

2268:
2269: l_success varchar2(1);
2270: l_error_code number;
2271: l_instance_set_id number;
2272: l_grantee_key fnd_grants.grantee_key%TYPE;
2273: l_grant_exists VARCHAR2(1);
2274: l_status_level VARCHAR2(30);
2275: l_default_menu_name fnd_menus.menu_name%TYPE := null;
2276: l_status_type_tbl SYSTEM.pa_varchar2_30_tbl_type := null;

Line 2281: l_parameter2 fnd_grants.parameter2%TYPE;

2277: l_status_code_tbl SYSTEM.pa_varchar2_30_tbl_type := null;
2278: l_menu_name_tbl SYSTEM.pa_varchar2_30_tbl_type := null;
2279: l_exp_error varchar2(1) := 'F';
2280: l_unexp_error varchar2(1) := 'F';
2281: l_parameter2 fnd_grants.parameter2%TYPE;
2282: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
2283: l_error_message_code VARCHAR2(30);
2284: l_grant_guid fnd_grants.grant_guid%TYPE;
2285: l_role_status_menu_id_tbl SYSTEM.pa_num_tbl_type := null;

Line 2284: l_grant_guid fnd_grants.grant_guid%TYPE;

2280: l_unexp_error varchar2(1) := 'F';
2281: l_parameter2 fnd_grants.parameter2%TYPE;
2282: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
2283: l_error_message_code VARCHAR2(30);
2284: l_grant_guid fnd_grants.grant_guid%TYPE;
2285: l_role_status_menu_id_tbl SYSTEM.pa_num_tbl_type := null;
2286:
2287: cursor get_resources_on_role is
2288: select distinct ppp.resource_type_id,ppp.resource_source_id

Line 2340: -- insert records back to fnd_Grants

2336: ELSE
2337: l_parameter2 := 'DEFAULT';
2338: END IF;
2339:
2340: -- insert records back to fnd_Grants
2341: FOR res in get_resources_on_role LOOP
2342:
2343: IF res.resource_type_id = 112 THEN
2344: SELECT wfr.name grantee_key

Line 2366: -- insert new records into FND_GRANTS

2362:
2363: --dbms_output.put_line('------------------------------');
2364: --dbms_output.put_line('grantee_key: ' || l_grantee_key);
2365:
2366: -- insert new records into FND_GRANTS
2367: fnd_grants_pkg.grant_function
2368: (
2369: p_api_version => l_api_version, -- Modified the parameter from '1.0' to l_api_version: Bug #3983570
2370: p_menu_name => l_default_menu_name,

Line 2367: fnd_grants_pkg.grant_function

2363: --dbms_output.put_line('------------------------------');
2364: --dbms_output.put_line('grantee_key: ' || l_grantee_key);
2365:
2366: -- insert new records into FND_GRANTS
2367: fnd_grants_pkg.grant_function
2368: (
2369: p_api_version => l_api_version, -- Modified the parameter from '1.0' to l_api_version: Bug #3983570
2370: p_menu_name => l_default_menu_name,
2371: p_object_name => 'PA_PROJECTS',

Line 2403: fnd_grants_pkg.grant_function

2399: IF l_status_code_tbl IS NOT NULL AND l_status_code_tbl.COUNT > 0 THEN
2400:
2401: FOR i IN l_status_code_tbl.FIRST..l_status_code_tbl.LAST LOOP
2402:
2403: fnd_grants_pkg.grant_function
2404: (
2405: p_api_version => l_api_version, -- Modified the parameter from '1.0' to l_api_version: Bug #3983570
2406: p_menu_name => l_menu_name_tbl(i),
2407: p_object_name => 'PA_PROJECTS',

Line 2493: -- delete all but default from fnd_Grants

2489: IF G_project_roles_ins_set_id IS NULL THEN
2490: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2491: END IF;
2492:
2493: -- delete all but default from fnd_Grants
2494: DELETE FROM fnd_grants
2495: WHERE parameter1 = to_char(p_project_role_id)
2496: AND (parameter2 = 'USER' OR parameter2 = 'SYSTEM')
2497: AND instance_type = 'SET'

Line 2494: DELETE FROM fnd_grants

2490: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2491: END IF;
2492:
2493: -- delete all but default from fnd_Grants
2494: DELETE FROM fnd_grants
2495: WHERE parameter1 = to_char(p_project_role_id)
2496: AND (parameter2 = 'USER' OR parameter2 = 'SYSTEM')
2497: AND instance_type = 'SET'
2498: AND instance_set_id = G_project_roles_ins_set_id;

Line 2555: l_grantee_key fnd_grants.grantee_key%TYPE;

2551: and per.party_id = wfr.orig_system_id
2552: and wfr.orig_system = 'HZ_PARTY';
2553:
2554:
2555: l_grantee_key fnd_grants.grantee_key%TYPE;
2556: l_status_menu_count NUMBER := 0;
2557: l_parameter2 fnd_grants.parameter2%TYPE;
2558: l_opp_param2 fnd_grants.parameter2%TYPE;
2559: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

Line 2557: l_parameter2 fnd_grants.parameter2%TYPE;

2553:
2554:
2555: l_grantee_key fnd_grants.grantee_key%TYPE;
2556: l_status_menu_count NUMBER := 0;
2557: l_parameter2 fnd_grants.parameter2%TYPE;
2558: l_opp_param2 fnd_grants.parameter2%TYPE;
2559: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2560: l_grant_guid fnd_grants.grant_guid%TYPE;
2561: l_success varchar2(1);

Line 2558: l_opp_param2 fnd_grants.parameter2%TYPE;

2554:
2555: l_grantee_key fnd_grants.grantee_key%TYPE;
2556: l_status_menu_count NUMBER := 0;
2557: l_parameter2 fnd_grants.parameter2%TYPE;
2558: l_opp_param2 fnd_grants.parameter2%TYPE;
2559: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2560: l_grant_guid fnd_grants.grant_guid%TYPE;
2561: l_success varchar2(1);
2562: l_exp_error varchar2(1);

Line 2560: l_grant_guid fnd_grants.grant_guid%TYPE;

2556: l_status_menu_count NUMBER := 0;
2557: l_parameter2 fnd_grants.parameter2%TYPE;
2558: l_opp_param2 fnd_grants.parameter2%TYPE;
2559: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2560: l_grant_guid fnd_grants.grant_guid%TYPE;
2561: l_success varchar2(1);
2562: l_exp_error varchar2(1);
2563: l_unexp_error varchar2(1);
2564: l_error_code number;

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

2568: IF G_project_roles_ins_set_id IS NULL THEN
2569: G_project_roles_ins_set_id := get_instance_set_id(G_project_roles_ins_set_name);
2570: END IF;
2571:
2572: -- 1. NEW: insert new records into FND_GRANTS
2573: IF p_new_status_code_tbl IS NOT NULL AND p_new_status_code_tbl.COUNT > 0 THEN
2574:
2575: --dbms_output.put_line('insert new record');
2576:

Line 2583: fnd_grants_pkg.grant_function

2579: l_grantee_key := res.grantee_key;
2580:
2581: FOR i IN p_new_status_code_tbl.FIRST..p_new_status_code_tbl.LAST LOOP
2582:
2583: fnd_grants_pkg.grant_function
2584: (
2585: p_api_version => l_api_version, -- Modified the parameter from '1.0' to l_api_version: Bug #3983570
2586: p_menu_name => p_new_menu_name_tbl(i),
2587: p_object_name => 'PA_PROJECTS',

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

2627: END IF; -- p_new_status_code_tbl.COUNT > 0 THEN
2628:
2629: IF l_return_status = fnd_api.g_ret_sts_success THEN
2630:
2631: -- 2. delete obsolete records from FND_GRANTS
2632: IF p_del_status_code_tbl IS NOT NULL AND p_del_status_code_tbl.COUNT > 0 THEN
2633:
2634: --dbms_output.put_line('delete records');
2635:

Line 2637: DELETE FROM fnd_grants

2633:
2634: --dbms_output.put_line('delete records');
2635:
2636: FORALL j in p_del_status_code_tbl.FIRST..p_del_status_code_tbl.LAST
2637: DELETE FROM fnd_grants
2638: WHERE parameter1 = to_char(p_project_role_id)
2639: AND (parameter2 = 'USER' OR parameter2 = 'SYSTEM')
2640: AND parameter3 = p_del_status_code_tbl(j)
2641: AND parameter4 = p_del_role_sts_menu_id_tbl(j)

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

2643: AND instance_set_id = G_project_roles_ins_set_id;
2644:
2645: END IF;
2646:
2647: -- 3. update existing records in FND_GRANTS
2648: IF p_mod_status_code_tbl IS NOT NULL AND p_mod_status_code_tbl.COUNT > 0 THEN
2649:
2650: --dbms_output.put_line('update records');
2651:

Line 2653: UPDATE fnd_grants

2649:
2650: --dbms_output.put_line('update records');
2651:
2652: FORALL k in p_mod_status_code_tbl.FIRST..p_mod_status_code_tbl.LAST
2653: UPDATE fnd_grants
2654: SET parameter2 = p_status_level,
2655: parameter3 = p_mod_status_code_tbl(k),
2656: menu_id = p_mod_menu_id_tbl(k)
2657: WHERE parameter1 = to_char(p_project_role_id)

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

2661: AND instance_set_id = G_project_roles_ins_set_id;
2662: END IF;
2663:
2664: -- 4. if there is no status-menu record for the role,
2665: -- set the fnd_grants records from DEFAULT to NON_STATUS_BASED
2666: select count(role_status_menu_id) into l_status_menu_count
2667: from pa_role_status_menu_map
2668: where role_id = p_project_role_id
2669: and rownum=1;

Line 2679: UPDATE fnd_grants

2675: l_parameter2 := 'DEFAULT';
2676: l_opp_param2 := 'NON_STATUS_BASED';
2677: END IF;
2678:
2679: UPDATE fnd_grants
2680: SET parameter2 = l_parameter2
2681: WHERE parameter1 = to_char(p_project_role_id)
2682: AND parameter2 = l_opp_param2
2683: AND instance_type = 'SET'