| 5354 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| User Roles |
|
|
|
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/_user_common.asp"-->
|
|
|
17 |
<%
|
|
|
18 |
'------------ ACCESS CONTROL ------------------
|
|
|
19 |
%>
|
|
|
20 |
<!--#include file="_access_control_general.asp"-->
|
|
|
21 |
<%
|
|
|
22 |
'------------ VARIABLE DEFINITION -------------
|
|
|
23 |
Dim sNode
|
|
|
24 |
Dim rsQry
|
|
|
25 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
26 |
Const ROW_SEPARATOR = "<tr><td colspan='4' background='images/bg_table_border.gif'><img src='images/spacer.gif' width='1' height='1'></td></tr>"
|
|
|
27 |
'------------ VARIABLE INIT -------------------
|
|
|
28 |
'------------ CONDITIONS ----------------------
|
|
|
29 |
'----------------------------------------------
|
|
|
30 |
%>
|
|
|
31 |
<%
|
|
|
32 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
33 |
Sub GroupByApplication ( rsQry )
|
|
|
34 |
%>
|
|
|
35 |
<tr>
|
| 6265 |
dpurdie |
36 |
<td colspan="4" class="body_rowg">
|
|
|
37 |
<a href="User_Roles.asp?app_id=<%=rsQry("app_id")%>&tree=<%=arrRoot( inxTNid + (nNumberofProperties * 0) )%>_<%=rsQry("app_id")%>_<%=arrAppProperties( inxTNid + (nNumberofProperties * 0) )%><%=objPMod.ComposeURLWithout("app_id,tree")%>" class="mmenu_link" <%If rsQry("app_id") = Request("app_id") Then Response.Write("style='font-weight: bold;'")%>>
|
|
|
38 |
<%=Expander ( Eval( rsQry("expand") = "-" ) ) &" "& rsQry("application_name")%>
|
|
|
39 |
</a>
|
|
|
40 |
</td>
|
| 5354 |
dpurdie |
41 |
</tr>
|
|
|
42 |
<%=ROW_SEPARATOR%>
|
|
|
43 |
<%Call GroupByRoles ( rsQry )%>
|
|
|
44 |
<%
|
|
|
45 |
End Sub
|
|
|
46 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
47 |
Sub GroupByRoles ( rsQry )
|
|
|
48 |
%>
|
|
|
49 |
<%rsQry.MoveNext%>
|
| 6265 |
dpurdie |
50 |
<%If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
|
| 5354 |
dpurdie |
51 |
If NOT IsNull(rsQry("role_id")) Then
|
|
|
52 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF) AND (NOT IsNull(rsQry("role_id")))
|
| 6265 |
dpurdie |
53 |
Dim bEnabled : bEnabled = canActionControl("canAssignRoleToUser") OR rsQry("can_delegate")
|
|
|
54 |
Dim ImageName
|
|
|
55 |
If IsNull( rsQry("is_role_variation") ) Then
|
|
|
56 |
ImageName = iif(bEnabled, LIMG_ROLE, LIMG_ROLE_OFF)
|
|
|
57 |
Else
|
|
|
58 |
ImageName = iif(bEnabled, LIMG_SPEC_ROLE, LIMG_SPEC_ROLE_OFF)
|
|
|
59 |
End If
|
| 5354 |
dpurdie |
60 |
%>
|
|
|
61 |
<tr>
|
| 6265 |
dpurdie |
62 |
<td align="center"><input type="checkbox" name="role_id_list" value="<%=rsQry("role_id")%>" <%=iif(bEnabled, "", " disabled ")%>></td>
|
|
|
63 |
<td nowrap class="body_row">
|
|
|
64 |
<a title="See Role General Info" href="Role_General.asp?role_id=<%=rsQry("role_id")%>&tree=<%=arrRoot( inxTNid + (nNumberofProperties * 0) )%>_<%=rsQry("app_id")%>_<%=arrAppProperties( inxTNid + (nNumberofProperties * 1) )%><%=objPMod.ComposeURLWithout("tree")%>" class="body_link">
|
|
|
65 |
<%=ImageName%><%=rsQry("role_name")%>
|
|
|
66 |
</a>
|
|
|
67 |
</td>
|
|
|
68 |
<td class="body_rowg"><%=rsQry("comments")%></td>
|
| 5354 |
dpurdie |
69 |
<td align="center"><a href="Role_Privileges.asp?role_id=<%=rsQry("role_id")%>&tree=<%=arrRoot( inxTNid + (nNumberofProperties * 0) )%>_<%=rsQry("app_id")%>_<%=arrAppProperties( inxTNid + (nNumberofProperties * 1) )%><%=objPMod.ComposeURLWithout("tree")%>" title='See this Role Privileges'><%=LIMG_CONTROL%></a></td>
|
|
|
70 |
</tr>
|
|
|
71 |
<%=ROW_SEPARATOR%>
|
|
|
72 |
<%
|
|
|
73 |
rsQry.MoveNext
|
|
|
74 |
WEnd
|
|
|
75 |
End If
|
|
|
76 |
|
|
|
77 |
rsQry.MovePrevious
|
|
|
78 |
%>
|
|
|
79 |
<%Else
|
|
|
80 |
rsQry.MovePrevious
|
|
|
81 |
%>
|
|
|
82 |
<%End If%>
|
|
|
83 |
<%
|
|
|
84 |
End Sub
|
|
|
85 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
86 |
%>
|
|
|
87 |
<%
|
|
|
88 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
89 |
Call GetUserDetails ( parUser_id, objUserCollector )
|
|
|
90 |
|
|
|
91 |
If (Request("action") <> "") Then
|
|
|
92 |
'-- Select Action
|
|
|
93 |
|
|
|
94 |
Select Case Request("action")
|
|
|
95 |
Case "btnRevokeRole"
|
|
|
96 |
Call OpenInWindow ( "_RevokeRole.asp?role_id_list="& Request("role_id_list") &"&rfile="& SCRIPT_NAME &"&"& objPMod.ComposeURL() )
|
|
|
97 |
|
|
|
98 |
End Select
|
|
|
99 |
|
|
|
100 |
End If
|
|
|
101 |
'----------------------------------------------
|
|
|
102 |
%>
|
|
|
103 |
<html>
|
|
|
104 |
<head>
|
|
|
105 |
<title>Access Manager</title>
|
|
|
106 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
107 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
108 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
109 |
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
|
|
|
110 |
<script language="JavaScript" src="scripts/common.js"></script>
|
| 6658 |
dpurdie |
111 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
| 5354 |
dpurdie |
112 |
</head>
|
|
|
113 |
|
|
|
114 |
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
|
|
|
115 |
<!-- HEADER ++++++++++++++++++++++ -->
|
|
|
116 |
<!--#include file="_header.asp"-->
|
|
|
117 |
<!-- +++++++++++++++++++++++++++++ -->
|
|
|
118 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
119 |
<tr>
|
|
|
120 |
<td width="1%" valign="top" background="images/bg_bage_pane.gif">
|
|
|
121 |
<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
122 |
<!--#include file="_treeNavigator.asp"-->
|
|
|
123 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
124 |
</td>
|
|
|
125 |
<td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
|
|
|
126 |
<td width="100%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="9">
|
|
|
127 |
<tr>
|
|
|
128 |
<td background="images/bg_drk_bage_pane.gif">
|
|
|
129 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
130 |
<tr>
|
|
|
131 |
<td nowrap class="body_txt">
|
|
|
132 |
<!-- BUTTONS CONTROL +++++++++++++++++++ -->
|
|
|
133 |
<%
|
|
|
134 |
'-- Define Action buttons on this tab
|
|
|
135 |
aTabBtnsDef = Array("btnGrantRole", "btnRevokeRole" )
|
|
|
136 |
|
|
|
137 |
If Request("app_id") = "" Then objBtnControl.AllActive = "N"
|
| 6265 |
dpurdie |
138 |
If NOT ( canActionControl("canAssignRoleToUser") OR canActionControl("canDelegateRoleToUser")) Then objBtnControl.AllActive = "N"
|
| 5354 |
dpurdie |
139 |
Call LoadTabActionButtons ( aTabBtnsDef, objBtnControl )
|
|
|
140 |
|
|
|
141 |
objBtnControl.Render( aTabBtnsDef )
|
|
|
142 |
%>
|
|
|
143 |
<!-- +++++++++++++++++++++++++++++++++++ -->
|
|
|
144 |
</td>
|
|
|
145 |
<td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td>
|
|
|
146 |
</tr>
|
|
|
147 |
</table>
|
|
|
148 |
</td>
|
|
|
149 |
</tr>
|
|
|
150 |
<tr>
|
|
|
151 |
<td class="menu_crumbttl"><%Call RenderTitle ( objUserCollector )%></td>
|
|
|
152 |
</tr>
|
|
|
153 |
<tr>
|
|
|
154 |
<td>
|
|
|
155 |
<!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
156 |
<!-- TAB CONTROLS ++++++++++++++++++++++ -->
|
|
|
157 |
<!--#include file="_tabs_definition.asp"-->
|
|
|
158 |
<%
|
|
|
159 |
Set objTabControl = New TabControl
|
|
|
160 |
objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleMac/mac_style.html") ) ' Supply tab style definition
|
|
|
161 |
objTabControl.TabStyle = "StyleMac"
|
|
|
162 |
objTabControl.AddTabDefnition ( arrUserAccount )
|
|
|
163 |
objTabControl.SelectByName ( "Roles" )
|
|
|
164 |
|
|
|
165 |
objTabControl.SetImgSelected "User Permissions", "icons/ai_major_problem.gif"
|
|
|
166 |
objTabControl.SetImgDeselected "User Permissions", "icons/ai_major_problem.gif"
|
|
|
167 |
objTabControl.SetHint "User Permissions", "Displayed values for selected Role"
|
|
|
168 |
|
|
|
169 |
objTabControl.SetImgSelected "User Override", "icons/ai_major_problem.gif"
|
|
|
170 |
objTabControl.SetImgDeselected "User Override", "icons/ai_major_problem.gif"
|
|
|
171 |
objTabControl.SetHint "User Override", "Displayed values for selected Role"
|
|
|
172 |
|
|
|
173 |
objTabControl.Render ()
|
|
|
174 |
%>
|
|
|
175 |
<!-- END OF TAB CONTROLS +++++++++++++++ -->
|
|
|
176 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
177 |
<tr>
|
|
|
178 |
<td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
|
|
|
179 |
<td width="100%" valign="top">
|
|
|
180 |
<table width="100%" border="0" cellspacing="10" cellpadding="0">
|
|
|
181 |
<tr>
|
|
|
182 |
<td>
|
|
|
183 |
<!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
|
|
|
184 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
|
|
185 |
<form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
|
|
|
186 |
<tr>
|
|
|
187 |
<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
| 6265 |
dpurdie |
188 |
<td width="10%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2">
|
| 5354 |
dpurdie |
189 |
<tr>
|
| 6265 |
dpurdie |
190 |
<td align="left" nowrap background="images/bg_table_col.gif" class="body_col">Role</td>
|
| 5354 |
dpurdie |
191 |
</tr>
|
|
|
192 |
</table></td>
|
| 6265 |
dpurdie |
193 |
<td width="70%" align="left" nowrap background="images/bg_table_col.gif" class="body_col">Description</td>
|
|
|
194 |
<td width="1%" align="left" nowrap background="images/bg_table_col.gif" class="body_col">Privileges</td>
|
| 5354 |
dpurdie |
195 |
</tr>
|
|
|
196 |
<%
|
| 6265 |
dpurdie |
197 |
OraDatabase.Parameters.Add "USER_ID_USER", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 5354 |
dpurdie |
198 |
OraDatabase.Parameters.Add "USER_ID", parUser_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
199 |
OraDatabase.Parameters.Add "APP_ID", parApp_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
200 |
|
|
|
201 |
Dim tempCnt
|
|
|
202 |
tempCnt = 0
|
|
|
203 |
|
|
|
204 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("UserRoles.sql") , ORADYN_DEFAULT )
|
|
|
205 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF) AND (tempCnt < 50)
|
|
|
206 |
Call GroupByApplication ( rsQry )
|
|
|
207 |
|
|
|
208 |
rsQry.MoveNext
|
|
|
209 |
tempCnt = tempCnt + 1
|
|
|
210 |
WEnd
|
|
|
211 |
|
| 6265 |
dpurdie |
212 |
OraDatabase.Parameters.Remove "USER_ID_USER"
|
| 5354 |
dpurdie |
213 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
214 |
OraDatabase.Parameters.Remove "APP_ID"
|
|
|
215 |
%>
|
|
|
216 |
<tr>
|
|
|
217 |
<td colspan="4" background="images/bg_table_border.gif">
|
|
|
218 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
219 |
<tr>
|
|
|
220 |
<td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
221 |
</tr>
|
|
|
222 |
</table>
|
|
|
223 |
</td>
|
|
|
224 |
</tr>
|
|
|
225 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
226 |
<input type="hidden" name="action" value="true">
|
|
|
227 |
</form>
|
|
|
228 |
</table>
|
|
|
229 |
<SPAN class="body_txtg"><b>NOTE:</b> "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.</SPAN>
|
|
|
230 |
<!-- +++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
231 |
</td>
|
|
|
232 |
</tr>
|
|
|
233 |
</table>
|
|
|
234 |
</td>
|
|
|
235 |
<td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
236 |
</tr>
|
|
|
237 |
</table>
|
|
|
238 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
239 |
<tr>
|
|
|
240 |
<td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
241 |
</tr>
|
|
|
242 |
</table>
|
|
|
243 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
244 |
<br></td>
|
|
|
245 |
</tr>
|
|
|
246 |
</table></td>
|
|
|
247 |
</tr>
|
|
|
248 |
</table>
|
|
|
249 |
<!-- FOOTER ++++++++++++++++++++++ -->
|
|
|
250 |
<!--#include file="_footer.asp"-->
|
|
|
251 |
<!-- +++++++++++++++++++++++++++++ -->
|
|
|
252 |
</body>
|
|
|
253 |
</html>
|
|
|
254 |
<%
|
|
|
255 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
256 |
'----------------------------------------------
|
|
|
257 |
%>
|
| 2 |
rsolanki |
258 |
<!--#include file="common/globals_destructor.asp"-->
|