Subversion Repositories DevTools

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 rsolanki 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|			      _SetControlPermissions		 	 |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/_code_behind_common.asp"-->
17
<%
18
'------------ ACCESS CONTROL ------------------
19
%>
20
<!--#include file="_access_control_general.asp"-->
21
<%
22
'------------ VARIABLE DEFINITION -------------
23
'------------ CONSTANTS DECLARATION -----------
24
'------------ VARIABLE INIT -------------------
25
'------------ CONDITIONS ----------------------
26
'----------------------------------------------
27
%>
28
<%
29
'--------------------------------------------------------------------------------------------------------------------------
30
Sub SetControlPermissions ()
31
	Dim rsQry, query, aRoles, RoleId
32
 
33
	On Error Resume Next
34
 
35
	OraDatabase.Parameters.Add "APP_ID", 	Request("app_id"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
36
	OraDatabase.Parameters.Add "OBJ_ID", 	Request("obj_id"), 		ORAPARM_INPUT, ORATYPE_NUMBER 
37
 
38
 
39
	'--- Get All Roles for this Application ---
40
	query = _
41
	" SELECT ro.ROLE_ID"&_
42
	"   FROM ROLES ro"&_
43
	"  WHERE ro.APP_ID = :APP_ID"
44
 
45
	Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
46
	aRoles = rsQry.GetRows()
47
	rsQry.Close
48
	Set rsQry = Nothing
49
 
50
 
51
	'--- Set Role Permissions ---
52
	objEH.TryORA ( OraSession )
53
 
54
		For Each RoleId In aRoles
55
			OraDatabase.ExecuteSQL _
56
			"BEGIN   pk_Role.Set_Role_Permissions ( "& RoleId &", :OBJ_ID, '"& Request( "VIS_"& RoleId ) &"', '"& Request( "ACT_"& RoleId ) &"' );   END;"
57
		Next
58
 
59
 
60
		'--- Log Action ---
61
		'objEH.LogAction  _
62
		'objAccessControl.UserId, _
63
		'enumAT_EVENT_COMMENT, _
64
		'"Sub RemoveProductFromOs PROD_ID_LIST="& Request("prod_id_list") &", OS_ID="& Request("os_id") , _
65
		'SCRIPT_NAME, _
66
		'"Removed Products from OS.", _
67
		'OraDatabase 
68
 
69
	objEH.CatchORA ( OraSession )
70
 
71
	OraDatabase.Parameters.Remove "APP_ID"
72
	OraDatabase.Parameters.Remove "OBJ_ID"
73
 
74
End Sub
75
'--------------------------------------------------------------------------------------------------------------------------
76
%>
77
<%
78
'**************************** M  A  I  N ******************************
79
' --- Form is Valid ---
80
Call SetControlPermissions()
81
 
82
If objEH.Finally Then
83
	Call OpenInWindow ( Request("rfile") &"?"& objPMod.ComposeURL() )
84
End If
85
'**********************************************************************
86
%>
87
<%
88
'------------ RUN AFTER CODE RUN --------------
89
'----------------------------------------------
90
%><!--#include file="common/globals_destructor.asp"-->