Subversion Repositories DevTools

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                            _SetControlPermissions                     |
'|                                                   |
'=====================================================
%>
<%
Option explicit
Response.Expires = 0
%>
<!--#include file="common/globals.asp"-->
<!--#include file="common/config.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/_code_behind_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ VARIABLE DEFINITION -------------
'------------ CONSTANTS DECLARATION -----------
'------------ VARIABLE INIT -------------------
'------------ CONDITIONS ----------------------
'----------------------------------------------
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
Sub SetControlPermissions ()
        Dim rsQry, query, aRoles, RoleId
        
        On Error Resume Next
        
        OraDatabase.Parameters.Add "APP_ID",    Request("app_id"),              ORAPARM_INPUT, ORATYPE_NUMBER 
        OraDatabase.Parameters.Add "OBJ_ID",    Request("obj_id"),              ORAPARM_INPUT, ORATYPE_NUMBER 
        
        
        '--- Get All Roles for this Application ---
        query = _
        " SELECT ro.ROLE_ID"&_
        "   FROM ROLES ro"&_
        "  WHERE ro.APP_ID = :APP_ID"
        
        Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
        aRoles = rsQry.GetRows()
        rsQry.Close
        Set rsQry = Nothing
        
        
        '--- Set Role Permissions ---
        objEH.TryORA ( OraSession )
                
                For Each RoleId In aRoles
                        OraDatabase.ExecuteSQL _
                        "BEGIN   pk_Role.Set_Role_Permissions ( "& RoleId &", :OBJ_ID, '"& Request( "VIS_"& RoleId ) &"', '"& Request( "ACT_"& RoleId ) &"' );   END;"
                Next
                
                
                '--- Log Action ---
                'objEH.LogAction  _
                'objAccessControl.UserId, _
                'enumAT_EVENT_COMMENT, _
                '"Sub RemoveProductFromOs PROD_ID_LIST="& Request("prod_id_list") &", OS_ID="& Request("os_id") , _
                'SCRIPT_NAME, _
                '"Removed Products from OS.", _
                'OraDatabase 
                
        objEH.CatchORA ( OraSession )
        
        OraDatabase.Parameters.Remove "APP_ID"
        OraDatabase.Parameters.Remove "OBJ_ID"
        
End Sub
'--------------------------------------------------------------------------------------------------------------------------
%>
<%
'**************************** M  A  I  N ******************************
' --- Form is Valid ---
Call SetControlPermissions()

If objEH.Finally Then
        Call OpenInWindow ( Request("rfile") &"?"& objPMod.ComposeURL() )
End If
'**********************************************************************
%>
<%
'------------ RUN AFTER CODE RUN --------------
'----------------------------------------------
%><!--#include file="common/globals_destructor.asp"-->