| Line 1... |
Line 1... |
| 1 |
<%@LANGUAGE="VBSCRIPT"%>
|
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
| 2 |
<%
|
2 |
<%
|
| 3 |
'=====================================================
|
3 |
'=====================================================
|
| 4 |
'| |
|
- |
|
| - |
|
4 |
'
|
| 5 |
'| User Privileges |
|
5 |
' User_Privileges.asp
|
| - |
|
6 |
' Display the complete list of user privileges and the source of the permission
|
| 6 |
'| |
|
7 |
' Tis page does not allow them to be edited - that is done on other pages
|
| 7 |
'=====================================================
|
8 |
'=====================================================
|
| 8 |
%>
|
9 |
%>
|
| 9 |
<%
|
10 |
<%
|
| 10 |
Option explicit
|
11 |
Option explicit
|
| 11 |
Response.Expires = 0
|
12 |
Response.Expires = 0
|
| Line 25... |
Line 26... |
| 25 |
Dim VisibleCombo
|
26 |
Dim VisibleCombo
|
| 26 |
Dim currObj_id
|
27 |
Dim currObj_id
|
| 27 |
Dim isNewGroup
|
28 |
Dim isNewGroup
|
| 28 |
Dim isVisibleComboDisabled
|
29 |
Dim isVisibleComboDisabled
|
| 29 |
Dim isActiveComboDisabled
|
30 |
Dim isActiveComboDisabled
|
| - |
|
31 |
Dim ActionDescriptions
|
| - |
|
32 |
Dim objAppCollector
|
| 30 |
'------------ CONSTANTS DECLARATION -----------
|
33 |
'------------ CONSTANTS DECLARATION -----------
|
| 31 |
'------------ VARIABLE INIT -------------------
|
34 |
'------------ VARIABLE INIT -------------------
|
| - |
|
35 |
Set objAppCollector = CreateObject("Scripting.Dictionary")
|
| 32 |
'------------ CONDITIONS ----------------------
|
36 |
'------------ CONDITIONS ----------------------
|
| 33 |
'----------------------------------------------
|
37 |
'----------------------------------------------
|
| 34 |
%>
|
38 |
%>
|
| 35 |
<%
|
39 |
<%
|
| 36 |
'--------------------------------------------------------------------------------------------------------------------------------------------
|
40 |
'--------------------------------------------------------------------------------------------------------------------------------------------
|
| 37 |
Sub SetPermissionCombos ( nObj_id, bNewGroup, cIsRoleVariation, _
|
41 |
Sub GetActionDescriptions
|
| 38 |
ByRef isVisibleComboDisabled, ByRef isActiveComboDisabled, _
|
42 |
Set ActionDescriptions = CreateObject("Scripting.Dictionary")
|
| - |
|
43 |
If parApp_id <> "" Then
|
| 39 |
cVisible, cActive, _
|
44 |
Dim rsQry, query
|
| 40 |
ByRef outVisibleCombo, ByRef outActiveCombo )
|
45 |
query = "Select OBJ_ID, OBJ_NAME, OBJ_DESCRIPTION from control_objects where app_id = " & parApp_id
|
| 41 |
Dim i, selected
|
46 |
|
| - |
|
47 |
Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
|
| 42 |
|
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
|
| 43 |
|
58 |
End Sub
|
| - |
|
59 |
'--------------------------------------------------------------------------------------------------------------------------------------------
|
| 44 |
' --- Reset combos "disabled" if necessary ---
|
60 |
Sub SetPermissionCombos ( nObj_id, _
|
| - |
|
61 |
bNewGroup, _
|
| 45 |
If bNewGroup AND IsNull( cIsRoleVariation ) Then
|
62 |
cIsRoleVariation, _
|
| 46 |
isVisibleComboDisabled = ""
|
63 |
ByRef isVisibleComboDisabled,_
|
| 47 |
isActiveComboDisabled = ""
|
64 |
ByRef isActiveComboDisabled, _
|
| 48 |
End If
|
65 |
cVisible, _
|
| - |
|
66 |
cActive, _
|
| - |
|
67 |
ByRef outVisibleCombo, _
|
| - |
|
68 |
ByRef outActiveCombo )
|
| 49 |
|
69 |
Dim i
|
| - |
|
70 |
Dim visText, actText
|
| 50 |
|
71 |
|
| 51 |
|
72 |
|
| 52 |
' --- Visible Combo ---
|
73 |
' --- Visible Combo ---
|
| 53 |
outVisibleCombo = ""
|
- |
|
| 54 |
outVisibleCombo = outVisibleCombo &"<select name='VIS_"& nObj_id &"' class='form_iname' "& isVisibleComboDisabled &">"
|
- |
|
| 55 |
|
- |
|
| 56 |
For i = 0 To UBound( arrVisiblePermissions ) Step NumberofPermissionFields
|
74 |
For i = 0 To UBound( arrVisiblePermissions ) Step NumberofPermissionFields
|
| 57 |
selected = ""
|
- |
|
| 58 |
If arrVisiblePermissions( INXperm_val + i ) = cVisible Then
|
75 |
If arrVisiblePermissions( INXperm_val + i ) = cVisible Then
|
| 59 |
selected = "selected"
|
76 |
visText = arrVisiblePermissions( INXperm_text + i )
|
| 60 |
End If
|
77 |
End If
|
| 61 |
|
- |
|
| 62 |
outVisibleCombo = outVisibleCombo &"<option class='"& arrVisiblePermissions( INXperm_style + i ) &"' "& selected &" value='"& arrVisiblePermissions( INXperm_val + i ) &"'>"& arrVisiblePermissions( INXperm_text + i ) &"</option>"& VBNewLine
|
- |
|
| 63 |
Next
|
78 |
Next
|
| 64 |
|
79 |
|
| 65 |
outVisibleCombo = outVisibleCombo &"</select>"
|
80 |
outVisibleCombo = "<span class='form_iname'>" & visText & "</span>"
|
| 66 |
|
- |
|
| 67 |
|
81 |
|
| 68 |
|
82 |
|
| 69 |
' --- Active Combo ---
|
83 |
' --- Active Combo ---
|
| 70 |
outActiveCombo = ""
|
- |
|
| 71 |
outActiveCombo = outActiveCombo &"<select name='ACT_"& nObj_id &"' class='form_iname' "& isActiveComboDisabled &">"
|
- |
|
| 72 |
|
- |
|
| 73 |
For i = 0 To UBound( arrActivePermissions ) Step NumberofPermissionFields
|
84 |
For i = 0 To UBound( arrActivePermissions ) Step NumberofPermissionFields
|
| 74 |
selected = ""
|
- |
|
| 75 |
If arrActivePermissions( INXperm_val + i ) = cActive Then
|
85 |
If arrActivePermissions( INXperm_val + i ) = cActive Then
|
| 76 |
selected = "selected"
|
86 |
actText = arrActivePermissions( INXperm_text + i )
|
| 77 |
End If
|
87 |
End If
|
| 78 |
|
- |
|
| 79 |
outActiveCombo = outActiveCombo &"<option class='"& arrActivePermissions( INXperm_style + i ) &"' "& selected &" value='"& arrActivePermissions( INXperm_val + i ) &"'>"& arrActivePermissions( INXperm_text + i ) &"</option>"& VBNewLine
|
- |
|
| 80 |
Next
|
88 |
Next
|
| 81 |
|
89 |
|
| 82 |
outActiveCombo = outActiveCombo &"</select>"
|
90 |
outActiveCombo = "<span class='form_iname'>" & actText & "</span>"
|
| 83 |
|
- |
|
| 84 |
|
- |
|
| 85 |
|
- |
|
| 86 |
|
- |
|
| 87 |
' --- Set combos "disabled" if role variation is present ---
|
- |
|
| 88 |
If bNewGroup AND NOT IsNull( cIsRoleVariation ) Then
|
- |
|
| 89 |
isVisibleComboDisabled = "disabled"
|
- |
|
| 90 |
isActiveComboDisabled = "disabled"
|
- |
|
| 91 |
End If
|
- |
|
| 92 |
|
91 |
|
| 93 |
End Sub
|
92 |
End Sub
|
| 94 |
'--------------------------------------------------------------------------------------------------------------------------------------------
|
93 |
'--------------------------------------------------------------------------------------------------------------------------------------------
|
| 95 |
%>
|
94 |
%>
|
| 96 |
<%
|
95 |
<%
|
| 97 |
'------------ RUN BEFORE PAGE RENDER ----------
|
96 |
'------------ RUN BEFORE PAGE RENDER ----------
|
| 98 |
Call GetUserDetails ( parUser_id, objUserCollector )
|
97 |
Call GetUserDetails ( parUser_id, objUserCollector )
|
| - |
|
98 |
Call GetApplicationDetails ( parApp_id, objAppCollector )
|
| - |
|
99 |
Call GetActionDescriptions
|
| 99 |
'----------------------------------------------
|
100 |
'----------------------------------------------
|
| 100 |
%>
|
101 |
%>
|
| 101 |
<html>
|
102 |
<html>
|
| 102 |
<head>
|
103 |
<head>
|
| 103 |
<title>Access Manager</title>
|
104 |
<title>Access Manager</title>
|
| Line 133... |
Line 134... |
| 133 |
</tr>
|
134 |
</tr>
|
| 134 |
</table>
|
135 |
</table>
|
| 135 |
</td>
|
136 |
</td>
|
| 136 |
</tr>
|
137 |
</tr>
|
| 137 |
<tr>
|
138 |
<tr>
|
| 138 |
<td class="menu_crumbttl"><%Call RenderTitle ( objUserCollector )%></td>
|
139 |
<td class="menu_crumbttl"><%Call RenderTitle ( objUserCollector )%> Application: <%=objAppCollector.Item ("application_name")%></td>
|
| 139 |
</tr>
|
140 |
</tr>
|
| 140 |
<tr>
|
141 |
<tr>
|
| 141 |
<td>
|
142 |
<td>
|
| 142 |
<!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
143 |
<!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 143 |
<!-- TAB CONTROLS ++++++++++++++++++++++ -->
|
144 |
<!-- TAB CONTROLS ++++++++++++++++++++++ -->
|
| Line 157... |
Line 158... |
| 157 |
<td width="100%" valign="top">
|
158 |
<td width="100%" valign="top">
|
| 158 |
<table width="100%" border="0" cellspacing="10" cellpadding="0">
|
159 |
<table width="100%" border="0" cellspacing="10" cellpadding="0">
|
| 159 |
<tr>
|
160 |
<tr>
|
| 160 |
<td>
|
161 |
<td>
|
| 161 |
<!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
|
162 |
<!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
|
| 162 |
<%Call Messenger ( "Any permission changes will be appled to this user only!", 3, 400 )%><br>
|
- |
|
| 163 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
163 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
| 164 |
<form name="UserPrivileges" action="_SetRoleVariationPermissions.asp" method="post">
|
- |
|
| 165 |
<tr>
|
164 |
<tr>
|
| 166 |
<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
165 |
<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
| 167 |
<td width="20%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2">
|
166 |
<td width="20%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2">
|
| 168 |
<tr>
|
167 |
<tr>
|
| 169 |
<td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Role Name</td>
|
168 |
<td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Role Name</td>
|
| 170 |
</tr>
|
169 |
</tr>
|
| 171 |
</table></td>
|
170 |
</table></td>
|
| 172 |
<td width="20%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Control Name</td>
|
- |
|
| 173 |
<td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Permissions</td>
|
171 |
<td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Permissions</td>
|
| 174 |
<td width="60%" align="right" background="images/bg_table_col.gif" class="body_col"></td>
|
172 |
<td width="60%" align="right" background="images/bg_table_col.gif" class="body_col">Description</td>
|
| 175 |
</tr>
|
173 |
</tr>
|
| 176 |
<%
|
174 |
<%
|
| 177 |
OraDatabase.Parameters.Add "USER_ID", parUser_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
175 |
OraDatabase.Parameters.Add "USER_ID", parUser_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 178 |
OraDatabase.Parameters.Add "APP_ID", parApp_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
176 |
OraDatabase.Parameters.Add "APP_ID", parApp_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 179 |
|
177 |
|
| Line 187... |
Line 185... |
| 187 |
%>
|
185 |
%>
|
| 188 |
|
186 |
|
| 189 |
<%If currObj_id <> CInt(rsQry("obj_id")) Then%>
|
187 |
<%If currObj_id <> CInt(rsQry("obj_id")) Then%>
|
| 190 |
<%isNewGroup = TRUE%>
|
188 |
<%isNewGroup = TRUE%>
|
| 191 |
<tr>
|
189 |
<tr>
|
| - |
|
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>
|
| 192 |
<td nowrap colspan="5" class="body_row" bgcolor="F5F5F5"><%=LIMG_CONTROL & rsQry("obj_name")%></td>
|
194 |
<td class="body_row" bgcolor="F5F5F5"><%=ActionDescriptions.Item(rsQry("obj_id").Value)%></td>
|
| 193 |
</tr>
|
195 |
</tr>
|
| 194 |
<%currObj_id = CInt(rsQry("obj_id"))%>
|
196 |
<%currObj_id = CInt(rsQry("obj_id"))%>
|
| 195 |
<%End If%>
|
197 |
<%End If%>
|
| 196 |
|
198 |
|
| 197 |
<%Call SetPermissionCombos ( rsQry("role_id") &"_"& rsQry("obj_id"), _
|
199 |
<%Call SetPermissionCombos ( rsQry("role_id") &"_"& rsQry("obj_id"), _
|
| Line 200... |
Line 202... |
| 200 |
rsQry("visible_value"), rsQry("active_value"), _
|
202 |
rsQry("visible_value"), rsQry("active_value"), _
|
| 201 |
VisibleCombo, ActiveCombo )%>
|
203 |
VisibleCombo, ActiveCombo )%>
|
| 202 |
<tr>
|
204 |
<tr>
|
| 203 |
<td align="center"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
205 |
<td align="center"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
| 204 |
<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>
|
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>
|
| 205 |
<td nowrap class="body_row"><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></td>
|
- |
|
| 206 |
<td class="body_txt" nowrap background='images/bg_bage_pane.gif'> <%=VisibleCombo%> <%=ActiveCombo%> </td>
|
207 |
<td class="body_txt" nowrap background='images/bg_bage_pane.gif'> <%=VisibleCombo%> <%=ActiveCombo%> </td>
|
| 207 |
<td class="body_rowg"></td>
|
208 |
<td class="body_rowg"></td>
|
| 208 |
</tr>
|
209 |
</tr>
|
| 209 |
<%
|
210 |
<%
|
| 210 |
isNewGroup = FALSE
|
211 |
isNewGroup = FALSE
|
| Line 218... |
Line 219... |
| 218 |
WEnd
|
219 |
WEnd
|
| 219 |
|
220 |
|
| 220 |
OraDatabase.Parameters.Remove "USER_ID"
|
221 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 221 |
OraDatabase.Parameters.Remove "APP_ID"
|
222 |
OraDatabase.Parameters.Remove "APP_ID"
|
| 222 |
%>
|
223 |
%>
|
| 223 |
<tr>
|
- |
|
| 224 |
<td class="body_txt"></td>
|
- |
|
| 225 |
<td class="body_txt"></td>
|
- |
|
| 226 |
<td class="body_txt"></td>
|
- |
|
| 227 |
<td align="center" background='images/bg_bage_pane.gif'><input type="submit" name="btn" value="Apply" class="form_btn"></td>
|
- |
|
| 228 |
<td class="body_txt"></td>
|
- |
|
| 229 |
</tr>
|
- |
|
| 230 |
<tr>
|
224 |
<tr>
|
| 231 |
<td colspan="5" background="images/bg_table_border.gif">
|
225 |
<td colspan="5" background="images/bg_table_border.gif">
|
| 232 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
226 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
| 233 |
<tr>
|
227 |
<tr>
|
| 234 |
<td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
228 |
<td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
| 235 |
</tr>
|
229 |
</tr>
|
| 236 |
</table>
|
230 |
</table>
|
| 237 |
</td>
|
231 |
</td>
|
| 238 |
</tr>
|
232 |
</tr>
|
| 239 |
<%=objPMod.ComposeHiddenTags()%>
|
- |
|
| 240 |
<input type="hidden" name="rfile" value="<%=SCRIPT_NAME%>">
|
- |
|
| 241 |
</form>
|
- |
|
| 242 |
</table>
|
233 |
</table>
|
| 243 |
<SPAN class="body_txtg"><b>NOTE:</b> "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.</SPAN>
|
234 |
<SPAN class="body_txtg"><b>NOTE:</b> "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.</SPAN>
|
| 244 |
<!-- +++++++++++++++++++++++++++++++++++++++++ -->
|
235 |
<!-- +++++++++++++++++++++++++++++++++++++++++ -->
|
| 245 |
</td>
|
236 |
</td>
|
| 246 |
</tr>
|
237 |
</tr>
|