Subversion Repositories DevTools

Rev

Rev 5354 | Rev 6265 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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>
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") = "-" ) )  &"&nbsp;&nbsp;"&  rsQry("application_name")%></a></td>
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
<link rel="shortcut icon" href="<%=FavIcon%>"/>
94
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
95
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
96
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
97
<script language="JavaScript" src="scripts/common.js"></script>
98
 
99
</head>
100
 
101
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
102
<!-- HEADER ++++++++++++++++++++++ -->
103
<!--#include file="_header.asp"-->
104
<!-- +++++++++++++++++++++++++++++ -->
105
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
106
  <tr>
107
    <td width="1%" valign="top" background="images/bg_bage_pane.gif">
108
	<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
109
	<!--#include file="_treeNavigator.asp"-->  
110
	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
111
	</td>
112
    <td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
113
    <td width="100%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="9">
114
      <tr>
115
        <td background="images/bg_drk_bage_pane.gif">
116
		  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
117
            <tr>
118
              <td nowrap class="body_txt">
119
			    <!-- BUTTONS CONTROL +++++++++++++++++++ -->
120
				<%
121
				'-- Define Action buttons on this tab
122
				aTabBtnsDef = Array("btnGrantRole", "btnRevokeRole" )
123
 
124
				If Request("app_id") = "" Then objBtnControl.AllActive = "N"
125
				If NOT canActionControl("canAssignRoleToUser") Then objBtnControl.AllActive = "N"
126
 
127
				Call LoadTabActionButtons ( aTabBtnsDef, objBtnControl )
128
 
129
				objBtnControl.Render( aTabBtnsDef )
130
				%>
131
				<!-- +++++++++++++++++++++++++++++++++++ -->
132
			  </td>
133
              <td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td>
134
            </tr>
135
          </table>
136
		</td>
137
      </tr>
138
	  <tr>
139
        <td class="menu_crumbttl"><%Call RenderTitle ( objUserCollector )%></td>
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 ( "Roles" )
152
 
153
			objTabControl.SetImgSelected "User Permissions", "icons/ai_major_problem.gif"
154
			objTabControl.SetImgDeselected "User Permissions", "icons/ai_major_problem.gif"
155
			objTabControl.SetHint "User Permissions", "Displayed values for selected Role"
156
 
157
			objTabControl.SetImgSelected "User Override", "icons/ai_major_problem.gif"
158
			objTabControl.SetImgDeselected "User Override", "icons/ai_major_problem.gif"
159
			objTabControl.SetHint "User Override", "Displayed values for selected Role" 
160
 
161
			objTabControl.Render ()
162
			%>
163
			<!-- END OF TAB CONTROLS +++++++++++++++ -->
164
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
165
          <tr>
166
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
167
            <td width="100%" valign="top">
168
			  <table width="100%"  border="0" cellspacing="10" cellpadding="0">
169
                <tr>
170
                  <td>
171
				  <!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
172
					<table width="100%"  border="0" cellspacing="3" cellpadding="0">
173
					<form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
174
			          <tr>
175
					  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
176
			            <td width="30%" background="images/bg_table_border.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
177
			              <tr>
178
			                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Role</td>
179
			              </tr>
180
			            </table></td>
181
			            <td width="60%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Application</td>
182
			            <td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
183
			          </tr>
184
					  <%
185
					  OraDatabase.Parameters.Add "USER_ID", parUser_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
186
					  OraDatabase.Parameters.Add "APP_ID", parApp_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
187
 
188
					  Dim tempCnt
189
					  tempCnt = 0
190
 
191
					  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("UserRoles.sql") , ORADYN_DEFAULT )
192
					  While (NOT rsQry.BOF) AND (NOT rsQry.EOF) AND (tempCnt < 50)
193
					  	Call GroupByApplication ( rsQry )
194
 
195
					    rsQry.MoveNext
196
						tempCnt = tempCnt + 1
197
					  WEnd
198
 
199
					  OraDatabase.Parameters.Remove "USER_ID"
200
					  OraDatabase.Parameters.Remove "APP_ID"
201
					  %>
202
			          <tr>
203
			            <td colspan="4" background="images/bg_table_border.gif">
204
						 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
205
			              <tr>
206
			                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
207
			              </tr>
208
			             </table>
209
						</td>
210
			          </tr>
211
					  <%=objPMod.ComposeHiddenTags()%>
212
					  <input type="hidden" name="action" value="true">
213
					 </form>
214
			         </table>
215
					 <SPAN class="body_txtg"><b>NOTE:</b> "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.</SPAN>
216
				  <!-- +++++++++++++++++++++++++++++++++++++++++ -->
217
				  </td>
218
                </tr>
219
              </table>
220
			</td>
221
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
222
          </tr>
223
         </table>
224
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
225
           <tr>
226
             <td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
227
           </tr>
228
         </table>
229
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
230
         <br></td>
231
      </tr>
232
    </table></td>
233
  </tr>
234
</table>
235
<!-- FOOTER ++++++++++++++++++++++ -->
236
<!--#include file="_footer.asp"-->
237
<!-- +++++++++++++++++++++++++++++ -->
238
</body>
239
</html>
240
<%
241
'------------ RUN AFTER PAGE RENDER -----------
242
'----------------------------------------------
243
%>
2 rsolanki 244
<!--#include file="common/globals_destructor.asp"-->