The following lines contain the word 'select', 'insert', 'update' or 'delete':
G_update_allowed := NULL;
|| Function Name: allow_update
||
|| Input Parameters:
|| X_award_id <-- award identifier
||
|| Description:
|| This function determines whether a user has update privileges for
|| a particular award.
||
|| The structure is identical to the allow_query function. In
|| the client extension, however, there is NO seeded validation
|| for 'ALLOW_UPDATE'. GMS assumes that if a person has query access
|| for the award (ie, is an active key member), he/she may also
|| update information on the award.
||
|| ---------------------------------------------------------------------
*/
FUNCTION allow_update ( X_award_id IN NUMBER) RETURN VARCHAR2
IS
V_allow_update VARCHAR2(1);
IF ( G_update_allowed IS NOT NULL ) THEN
RETURN( G_update_allowed );
, 'ALLOW_UPDATE'
, V_allow_update );
IF ( V_allow_update IN ('Y', 'N') ) THEN
RETURN( V_allow_update );
END allow_update;
IF ( X_security_level = 'ALLOW_UPDATE' ) THEN
IF ( X_value IS NULL ) THEN
G_update_allowed := NULL;
G_update_allowed := X_value;
SELECT 1
INTO dummy
FROM dual
WHERE EXISTS (
SELECT NULL
FROM gms_personnel
WHERE award_id = X_award_id
AND person_id = X_person_id
AND TRUNC(sysdate) BETWEEN start_date_active
AND NVL(end_date_active, sysdate) );