DBA Data[Home] [Help]

PACKAGE BODY: APPS.GMS_SECURITY_EXTN

Source


1 PACKAGE BODY gms_security_extn AS
2 /* $Header: gmsseexb.pls 120.1 2005/07/26 14:38:26 appldev ship $ */
3 
4   PROCEDURE check_award_access ( X_award_id                IN NUMBER
5                                  , X_person_id             IN NUMBER
6                                  , X_calling_module        IN VARCHAR2
7                                  , X_event                 IN VARCHAR2
8                                  , X_value                 OUT NOCOPY VARCHAR2 )
9   IS
10     -- Declare local variables
11 
12     X_award_num 	VARCHAR2(25);
13 
14   BEGIN
15 
16     IF ( X_event = 'ALLOW_QUERY' ) THEN
17 
18       -- The default behavior is to only allow access to the Award Status Inquiry
19       -- window to key members of the award.  All other windows will display all
20       -- awards by default.
21 
22       -- GMS provides an API to determine
23       -- whether or not a given person is an active key member on a specified
24       -- award.  This function, CHECK_KEY_MEMBER is defined in the
25       -- GMS_SECURITY package.  It takes two input parameters, person_id and
26       -- award_id, and returns as output: 'Y' if the person is an active
27       -- key member for the award, and 'N' if the person is not.
28 
29       -- Note, if NULL values are passed for either parameter, person or
30       -- award, then the function returns NULL.
31 
32         -- Code can be added here as per the business rules.
33         --Added to fix bug # 866342
34       IF (X_calling_module = 'GMSAWASI') THEN
35          X_value :=  gms_security.check_key_member( X_person_id, X_award_id );
36       ELSE
37          X_value := 'Y';
38       END IF;
39 
40       RETURN;
41 
42 
43     ELSIF ( X_event = 'ALLOW_UPDATE' ) THEN
44 
45       -- Note that a user must be granted ALLOW_QUERY access for a award
46       -- in order for this function to be called for that user and award.
47       -- Since  validates key members during ALLOW_QUERY, there is no
48       -- additional default validation in at the ALLOW_UPDATE level.
49 
50 
51       -- Code can be added here as per the business rules.
52       X_value := 'Y';
53       RETURN;
54 
55 
56     END IF;
57 
58   END check_award_access;
59 
60 END gms_security_extn;