create or replace package MY_SECURITY is ------------------------------------------------------------------------------------- -- CHECK_USER_IN_GROUP -- -- This function is used to check to see if the named user is a member of the specified -- group. It checks groups in both the native OID and Portal. -- -- Parameters: -- USER_ID - the user to check -- GROUP_ID - name of the group -- Returns TRUE or FALSE -- function CHECK_USER_IN_GROUP(USER_ID VARCHAR2, GROUP_ID VARCHAR2) RETURN BOOLEAN; ------------------------------------------------------------------------------------- -- CHECK_USER_IN_GROUP_YN -- -- Identical to the above function except it returns a Y or N value (for inclusion in -- SQL select statements). -- function CHECK_USER_IN_GROUP_YN(USER_ID VARCHAR2, GROUP_ID VARCHAR2) RETURN VARCHAR2; ------------------------------------------------------------------------------------- -- ADD_USER_TO_GROUP -- -- Adds the named user to the specified group. -- -- Parameters: -- USER_ID - the user to check -- GROUP_ID - name of the group -- procedure ADD_USER_TO_GROUP(USER_ID VARCHAR2, GROUP_ID VARCHAR2); ------------------------------------------------------------------------------------- -- GET_USER_GROUPS -- -- Returns a comma seperated list of the groups the user is a member of. -- -- Parameters: -- USER_ID - the user to check -- Returns a comma seperated list. -- function GET_USER_GROUPS(USER_ID VARCHAR2) RETURN VARCHAR2; END;