Subversion Repositories DevTools

Rev

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>
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"><%=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
<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
 
123
				Call LoadTabActionButtons ( aTabBtnsDef, objBtnControl )
124
 
125
				objBtnControl.Render( aTabBtnsDef )
126
				%>
127
				<!-- +++++++++++++++++++++++++++++++++++ -->
128
			  </td>
129
              <td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td>
130
            </tr>
131
          </table>
132
		</td>
133
      </tr>
134
	  <tr>
135
        <td class="menu_crumbttl"><%Call RenderTitle ( objUserCollector )%></td>
136
      </tr>
137
      <tr>
138
        <td>
139
		 <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
140
		 	<!-- TAB CONTROLS ++++++++++++++++++++++ -->
141
			<!--#include file="_tabs_definition.asp"-->
142
			<%
143
			Set objTabControl = New TabControl
144
			objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleMac/mac_style.html") ) ' Supply tab style definition
145
			objTabControl.TabStyle = "StyleMac"
146
			objTabControl.AddTabDefnition ( arrUserAccount )
147
			objTabControl.SelectByName ( "Roles" )
148
 
149
			objTabControl.SetImgSelected "User Privileges", "icons/ai_major_problem.gif"
150
			objTabControl.SetImgDeselected "User Privileges", "icons/ai_major_problem.gif"
151
			objTabControl.SetHint "User Privileges", "Some Comments" 
152
			objTabControl.Render ()
153
			%>
154
			<!-- END OF TAB CONTROLS +++++++++++++++ -->
155
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
156
          <tr>
157
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
158
            <td width="100%" valign="top">
159
			  <table width="100%"  border="0" cellspacing="10" cellpadding="0">
160
                <tr>
161
                  <td>
162
				  <!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
163
					<table width="100%"  border="0" cellspacing="3" cellpadding="0">
164
					<form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
165
			          <tr>
166
					  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
167
			            <td width="30%" background="images/bg_table_border.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
168
			              <tr>
169
			                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Role</td>
170
			              </tr>
171
			            </table></td>
172
			            <td width="60%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Application</td>
173
			            <td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
174
			          </tr>
175
					  <%
176
					  OraDatabase.Parameters.Add "USER_ID", parUser_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
177
					  OraDatabase.Parameters.Add "APP_ID", parApp_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
178
 
179
					  Dim tempCnt
180
					  tempCnt = 0
181
 
182
					  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("UserRoles.sql") , ORADYN_DEFAULT )
183
					  While (NOT rsQry.BOF) AND (NOT rsQry.EOF) AND (tempCnt < 50)
184
					  	Call GroupByApplication ( rsQry )
185
 
186
					    rsQry.MoveNext
187
						tempCnt = tempCnt + 1
188
					  WEnd
189
 
190
					  OraDatabase.Parameters.Remove "USER_ID"
191
					  OraDatabase.Parameters.Remove "APP_ID"
192
					  %>
193
			          <tr>
194
			            <td colspan="4" background="images/bg_table_border.gif">
195
						 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
196
			              <tr>
197
			                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
198
			              </tr>
199
			             </table>
200
						</td>
201
			          </tr>
202
					  <%=objPMod.ComposeHiddenTags()%>
203
					  <input type="hidden" name="action" value="true">
204
					 </form>
205
			         </table>
206
					 <SPAN class="body_txtg"><b>NOTE:</b> "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.</SPAN>
207
				  <!-- +++++++++++++++++++++++++++++++++++++++++ -->
208
				  </td>
209
                </tr>
210
              </table>
211
			</td>
212
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
213
          </tr>
214
         </table>
215
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
216
           <tr>
217
             <td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
218
           </tr>
219
         </table>
220
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
221
         <br></td>
222
      </tr>
223
    </table></td>
224
  </tr>
225
</table>
226
<!-- FOOTER ++++++++++++++++++++++ -->
227
<!--#include file="_footer.asp"-->
228
<!-- +++++++++++++++++++++++++++++ -->
229
</body>
230
</html>
231
<%
232
'------------ RUN AFTER PAGE RENDER -----------
233
'----------------------------------------------
234
%>
235
<!--#include file="common/globals_destructor.asp"-->