Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 rsolanki 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
5296 dpurdie 4
'
5
'   User_Privileges.asp
6
'   Display the complete list of user privileges and the source of the permission
7
'   Tis page does not allow them to be edited - that is done on other pages
2 rsolanki 8
'=====================================================
9
%>
10
<%
11
Option explicit
12
Response.Expires = 0
13
%>
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/config.asp"-->
16
<!--#include file="common/common_subs.asp"-->
17
<!--#include file="common/_user_common.asp"-->
18
<%
19
'------------ ACCESS CONTROL ------------------
20
%>
21
<!--#include file="_access_control_general.asp"-->
22
<%
23
'------------ VARIABLE DEFINITION -------------
24
Dim rsQry
25
Dim ActiveCombo
26
Dim VisibleCombo
27
Dim currObj_id
28
Dim isNewGroup
29
Dim isVisibleComboDisabled
30
Dim isActiveComboDisabled
5296 dpurdie 31
Dim ActionDescriptions
32
Dim objAppCollector
2 rsolanki 33
'------------ CONSTANTS DECLARATION -----------
34
'------------ VARIABLE INIT -------------------
5296 dpurdie 35
Set objAppCollector = CreateObject("Scripting.Dictionary")
2 rsolanki 36
'------------ CONDITIONS ----------------------
37
'----------------------------------------------
38
%>
39
<%
40
'--------------------------------------------------------------------------------------------------------------------------------------------
5296 dpurdie 41
Sub GetActionDescriptions
42
    Set ActionDescriptions = CreateObject("Scripting.Dictionary")
43
    If parApp_id <> "" Then
44
        Dim rsQry, query
45
        query = "Select OBJ_ID, OBJ_NAME, OBJ_DESCRIPTION from control_objects where app_id = " & parApp_id
46
 
47
        Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
48
 
49
        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
50
            ActionDescriptions.Add rsQry("OBJ_ID").Value , rsQry("OBJ_DESCRIPTION").Value
51
            rsQry.MoveNext
52
        Wend
53
 
54
        rsQry.Close
55
        Set rsQry = Nothing
56
 
57
    End If
58
End Sub
59
'--------------------------------------------------------------------------------------------------------------------------------------------
60
Sub SetPermissionCombos ( nObj_id, _
61
                          bNewGroup, _
62
                          cIsRoleVariation, _
63
						  ByRef isVisibleComboDisabled,_ 
64
                          ByRef isActiveComboDisabled, _
65
						  cVisible, _
66
                          cActive, _
67
						  ByRef outVisibleCombo, _
68
                          ByRef outActiveCombo )
69
	Dim i
70
    Dim visText, actText
2 rsolanki 71
 
72
 
73
	' --- Visible Combo ---
74
	For i = 0 To UBound( arrVisiblePermissions ) Step NumberofPermissionFields
75
		If arrVisiblePermissions( INXperm_val + i ) = cVisible Then
5296 dpurdie 76
            visText = arrVisiblePermissions( INXperm_text + i ) 
2 rsolanki 77
		End If
78
	Next
79
 
5296 dpurdie 80
	outVisibleCombo = "<span class='form_iname'>" & visText & "</span>"
2 rsolanki 81
 
82
 
83
	' --- Active Combo ---
84
	For i = 0 To UBound( arrActivePermissions ) Step NumberofPermissionFields
85
		If arrActivePermissions( INXperm_val + i ) = cActive Then
5296 dpurdie 86
            actText = arrActivePermissions( INXperm_text + i ) 
2 rsolanki 87
		End If
88
	Next
5296 dpurdie 89
 
90
    outActiveCombo = "<span class='form_iname'>" & actText & "</span>"
2 rsolanki 91
 
92
End Sub
93
'--------------------------------------------------------------------------------------------------------------------------------------------
94
%>
95
<%
96
'------------ RUN BEFORE PAGE RENDER ----------
97
Call GetUserDetails ( parUser_id, objUserCollector )
5296 dpurdie 98
Call GetApplicationDetails ( parApp_id, objAppCollector )
99
Call GetActionDescriptions
2 rsolanki 100
'----------------------------------------------
101
%>
102
<html>
103
<head>
104
<title>Access Manager</title>
105
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
106
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
107
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
108
<script language="JavaScript" src="scripts/common.js"></script>
109
 
110
</head>
111
 
112
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
113
<!-- HEADER ++++++++++++++++++++++ -->
114
<!--#include file="_header.asp"-->
115
<!-- +++++++++++++++++++++++++++++ -->
116
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
117
  <tr>
118
    <td width="1%" valign="top" background="images/bg_bage_pane.gif">
119
	<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
120
	<!--#include file="_treeNavigator.asp"-->  
121
	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
122
	</td>
123
    <td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
124
    <td width="100%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="9">
125
      <tr>
126
        <td background="images/bg_drk_bage_pane.gif">
127
		  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
128
            <tr>
129
              <td nowrap class="body_txt">
130
			    <!-- BUTTONS CONTROL +++++++++++++++++++ -->
131
				<!-- +++++++++++++++++++++++++++++++++++ -->
132
			  </td>
133
              <td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td>
134
            </tr>
135
          </table>
136
		</td>
137
      </tr>
138
	  <tr>
5296 dpurdie 139
        <td class="menu_crumbttl"><%Call RenderTitle ( objUserCollector )%> Application: <%=objAppCollector.Item ("application_name")%></td>
2 rsolanki 140
      </tr>
141
      <tr>
142
        <td>
143
		 <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
144
		 	<!-- TAB CONTROLS ++++++++++++++++++++++ -->
145
			<!--#include file="_tabs_definition.asp"-->
146
			<%
147
			Set objTabControl = New TabControl
148
			objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleMac/mac_style.html") ) ' Supply tab style definition
149
			objTabControl.TabStyle = "StyleMac"
150
			objTabControl.AddTabDefnition ( arrUserAccount )
151
			objTabControl.SelectByName ( "User Permissions" )
152
			objTabControl.Render ()
153
			%>
154
			<!-- END OF TAB CONTROLS +++++++++++++++ -->
155
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
156
          <tr>
157
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
158
            <td width="100%" valign="top">
159
			  <table width="100%"  border="0" cellspacing="10" cellpadding="0">
160
                <tr>
161
                  <td>
162
				  <!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
163
					<table width="100%"  border="0" cellspacing="3" cellpadding="0">
164
			          <tr>
165
					  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
166
			            <td width="20%" background="images/bg_table_border.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
167
			              <tr>
168
			                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Role Name</td>
169
			              </tr>
170
			            </table></td>
171
						<td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Permissions</td>
5296 dpurdie 172
						<td width="60%" align="right" background="images/bg_table_col.gif" class="body_col">Description</td>
2 rsolanki 173
			          </tr>
174
					  <%
175
					  OraDatabase.Parameters.Add "USER_ID",  parUser_id, ORAPARM_INPUT, ORATYPE_NUMBER 
176
					  OraDatabase.Parameters.Add "APP_ID",   parApp_id,	 ORAPARM_INPUT, ORATYPE_NUMBER 
177
 
178
					  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("UserPermissions.sql") , ORADYN_DEFAULT )
179
					  currObj_id = -1
180
					  isNewGroup = FALSE
181
					  isVisibleComboDisabled = ""
182
					  isActiveComboDisabled = ""
183
 
184
					  While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
185
					  %>
186
 
187
					  <%If currObj_id <> CInt(rsQry("obj_id")) Then%>
188
					  <%isNewGroup = TRUE%>
189
					  <tr>
5296 dpurdie 190
						<td nowrap colspan="2" class="body_row" bgcolor="F5F5F5">
191
                            <a href="Control_Privileges.asp?obj_id=<%=rsQry("obj_id")%><%=objPMod.ComposeURLWithout("obj_id")%>" title="See this Control Permissions" class="body_link"><%=LIMG_CONTROL & rsQry("obj_name")%></a>
192
                        </td>
193
						<td nowrap class="body_row" bgcolor="F5F5F5"></td>
194
						<td class="body_row" bgcolor="F5F5F5"><%=ActionDescriptions.Item(rsQry("obj_id").Value)%></td>
2 rsolanki 195
			          </tr>
196
					  <%currObj_id = CInt(rsQry("obj_id"))%>
197
					  <%End If%>
198
 
199
					  <%Call SetPermissionCombos ( rsQry("role_id") &"_"& rsQry("obj_id"), _
200
					  							   isNewGroup, rsQry("is_role_variation"), _
201
												   isVisibleComboDisabled, isActiveComboDisabled, _
202
					  							   rsQry("visible_value"), rsQry("active_value"), _
203
												   VisibleCombo, ActiveCombo )%>
204
			          <tr>
205
					  	<td align="center"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
206
						<td nowrap class="body_row"><a href="Role_Privileges.asp?role_id=<%=rsQry("role_id")%><%=objPMod.ComposeURLWithout("role_id")%>" title="See this Role Permissions" class="body_link"><%If IsNull( rsQry("is_role_variation") ) Then%><%=LIMG_ROLE%><%Else%><%=LIMG_SPEC_ROLE%><%End If%><%=rsQry("role_name")%></a></td>
207
						<td class="body_txt" nowrap background='images/bg_bage_pane.gif'>&nbsp;&nbsp;<%=VisibleCombo%>&nbsp;&nbsp;<%=ActiveCombo%>&nbsp;&nbsp;</td>
208
						<td class="body_rowg"></td>
209
			          </tr>
210
					  <%
211
					  isNewGroup = FALSE
212
					  rsQry.MoveNext
213
					  %>
214
 
215
			          <tr>
216
			            <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
217
			          </tr>
218
					  <%
219
					  WEnd
220
 
221
					  OraDatabase.Parameters.Remove "USER_ID"
222
					  OraDatabase.Parameters.Remove "APP_ID"
223
					  %>
224
			          <tr>
225
			            <td colspan="5" background="images/bg_table_border.gif">
226
						 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
227
			              <tr>
228
			                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
229
			              </tr>
230
			             </table>
231
						</td>
232
			          </tr>
233
			         </table>
234
					 <SPAN class="body_txtg"><b>NOTE:</b> "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.</SPAN>
235
				  <!-- +++++++++++++++++++++++++++++++++++++++++ -->
236
				  </td>
237
                </tr>
238
              </table>
239
			</td>
240
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
241
          </tr>
242
         </table>
243
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
244
           <tr>
245
             <td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
246
           </tr>
247
         </table>
248
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
249
         <br></td>
250
      </tr>
251
    </table></td>
252
  </tr>
253
</table>
254
<!-- FOOTER ++++++++++++++++++++++ -->
255
<!--#include file="_footer.asp"-->
256
<!-- +++++++++++++++++++++++++++++ -->
257
</body>
258
</html>
259
<%
260
'------------ RUN AFTER PAGE RENDER -----------
261
'----------------------------------------------
262
%>
263
<!--#include file="common/globals_destructor.asp"-->