Using an Application Map Table for Provisioning
Novell Cool Solutions: Tip
By Alfredo Luiz Santos
Digg This -
Slashdot This
Posted: 17 Nov 2005 |
Problem
In a minimal provisioning situation, such as with a Hire Kit, you may need a mechanism to help you access new applications. For example, if a new user is a manager of "XPTO" location, he or she will need to have access to APP1 and APP2.
Solution
Use a map table of applications. You can follow the four steps below to develop the solution. This solution uses any database with a stored procedure and JDBC support.
Step 1
Prepare a map table using any JDBC-compliant Database, like this table:
JOB POSITION | LOCATION | APPLICATION MANAGER | XPTO | NETWARE MANAGER | | MAIL
Step 2
Create a stored procedure to search this table. An example is shown below.
Create or replace procedure minimalApp (varPOSITION IN VARCHAR2,varDEPARTMENT IN VARCHAR2,varLOCATION IN VARCHAR2,varAPP IN VARCHAR2, varLocAPP OUT number) IS BEGIN select count(APPLICATION) INTO varLocAPP from CERB_MINIMAL where POSITION=varPOSITION and DEPARTMENT IS NULL and LOCATION IS NULL AND APPLICATION=varAPP; dbms_output.put_line (varLocAPP); if varLocAPP = 0 THEN select count(APPLICATION) INTO varLocAPP from CERB_MINIMAL where POSITION=varPOSITION and DEPARTMENT = varDEPARTMENT and LOCATION IS NULL AND APPLICATION=varAPP; end if; dbms_output.put_line (varLocAPP); if varLocAPP = 0 THEN select COUNT(APPLICATION) INTO varLocAPP from CERB_MINIMAL where POSITION=varPOSITION and DEPARTMENT IS NULL and LOCATION = varLOCATION AND APPLICATION=varAPP ; end if; dbms_output.put_line (varLocAPP); if varLocAPP = 0 THEN select count(APPLICATION) into varLocAPP from CERB_MINIMAL where POSITION=varPOSITION and DEPARTMENT = varDEPARTMENT and LOCATION = varLOCATION AND APPLICATION=varAPP; end if; dbms_output.put_line (varLocAPP); if varLocAPP = 0 THEN select count(APPLICATION) into varLocAPP from CERB_MINIMAL where POSITION is null and DEPARTMENT = varDEPARTMENT and LOCATION IS NULL AND APPLICATION=varAPP; end if; dbms_output.put_line (varLocAPP); if varLocAPP = 0 THEN select count(APPLICATION) into varLocAPP from CERB_MINIMAL where POSITION is null and DEPARTMENT = varDEPARTMENT and LOCATION = varLOCATION AND APPLICATION=varAPP; end if; dbms_output.put_line (varLocAPP); if varLocAPP = 0 THEN select COUNT(APPLICATION) INTO varLocAPP from CERB_MINIMAL where POSITION is null and DEPARTMENT IS NULL and LOCATION = varLOCATION AND APPLICATION=varAPP; end if; dbms_output.put_line (varLocAPP); END;
Step 3
Create a Java class with a static method you can run to get the results you need. Click here for a sample Java class.
Step 4
For each application found in the query, check one attribute of the user as "TRUE" to be used as a trigger for another drivers.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com