Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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") = "-" ) )  &"&nbsp;&nbsp;"&  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
 
6 ghuddy 123
				If Request("app_id") = "" Then
124
					objBtnControl.AllActive = "N"
125
				End If
126
 
2 rsolanki 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 Privileges", "icons/ai_major_problem.gif"
154
			objTabControl.SetImgDeselected "User Privileges", "icons/ai_major_problem.gif"
155
			objTabControl.SetHint "User Privileges", "Some Comments" 
156
			objTabControl.Render ()
157
			%>
158
			<!-- END OF TAB CONTROLS +++++++++++++++ -->
159
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
160
          <tr>
161
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
162
            <td width="100%" valign="top">
163
			  <table width="100%"  border="0" cellspacing="10" cellpadding="0">
164
                <tr>
165
                  <td>
166
				  <!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
167
					<table width="100%"  border="0" cellspacing="3" cellpadding="0">
168
					<form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
169
			          <tr>
170
					  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
171
			            <td width="30%" background="images/bg_table_border.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
172
			              <tr>
173
			                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Role</td>
174
			              </tr>
175
			            </table></td>
176
			            <td width="60%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Application</td>
177
			            <td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
178
			          </tr>
179
					  <%
180
					  OraDatabase.Parameters.Add "USER_ID", parUser_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
181
					  OraDatabase.Parameters.Add "APP_ID", parApp_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
182
 
183
					  Dim tempCnt
184
					  tempCnt = 0
185
 
186
					  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("UserRoles.sql") , ORADYN_DEFAULT )
187
					  While (NOT rsQry.BOF) AND (NOT rsQry.EOF) AND (tempCnt < 50)
188
					  	Call GroupByApplication ( rsQry )
189
 
190
					    rsQry.MoveNext
191
						tempCnt = tempCnt + 1
192
					  WEnd
193
 
194
					  OraDatabase.Parameters.Remove "USER_ID"
195
					  OraDatabase.Parameters.Remove "APP_ID"
196
					  %>
197
			          <tr>
198
			            <td colspan="4" background="images/bg_table_border.gif">
199
						 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
200
			              <tr>
201
			                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
202
			              </tr>
203
			             </table>
204
						</td>
205
			          </tr>
206
					  <%=objPMod.ComposeHiddenTags()%>
207
					  <input type="hidden" name="action" value="true">
208
					 </form>
209
			         </table>
210
					 <SPAN class="body_txtg"><b>NOTE:</b> "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.</SPAN>
211
				  <!-- +++++++++++++++++++++++++++++++++++++++++ -->
212
				  </td>
213
                </tr>
214
              </table>
215
			</td>
216
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
217
          </tr>
218
         </table>
219
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
220
           <tr>
221
             <td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
222
           </tr>
223
         </table>
224
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
225
         <br></td>
226
      </tr>
227
    </table></td>
228
  </tr>
229
</table>
230
<!-- FOOTER ++++++++++++++++++++++ -->
231
<!--#include file="_footer.asp"-->
232
<!-- +++++++++++++++++++++++++++++ -->
233
</body>
234
</html>
235
<%
236
'------------ RUN AFTER PAGE RENDER -----------
237
'----------------------------------------------
238
%>
239
<!--#include file="common/globals_destructor.asp"-->