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