Rev 5296 | Rev 5512 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='' User_Privileges.asp' Display the complete list of user privileges and the source of the permission' Tis page does not allow them to be edited - that is done on other pages'=====================================================%><%Option explicitResponse.Expires = 0%><!--#include file="common/globals.asp"--><!--#include file="common/config.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/_user_common.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><%'------------ VARIABLE DEFINITION -------------Dim rsQryDim ActiveComboDim VisibleComboDim currObj_idDim isNewGroupDim isVisibleComboDisabledDim isActiveComboDisabledDim ActionDescriptionsDim objAppCollector'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------Set objAppCollector = CreateObject("Scripting.Dictionary")'------------ CONDITIONS ----------------------'----------------------------------------------%><%'--------------------------------------------------------------------------------------------------------------------------------------------Sub GetActionDescriptionsSet ActionDescriptions = CreateObject("Scripting.Dictionary")If parApp_id <> "" ThenDim rsQry, queryquery = "Select OBJ_ID, OBJ_NAME, OBJ_DESCRIPTION from control_objects where app_id = " & parApp_idSet rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))ActionDescriptions.Add rsQry("OBJ_ID").Value , rsQry("OBJ_DESCRIPTION").ValuersQry.MoveNextWendrsQry.CloseSet rsQry = NothingEnd IfEnd Sub'--------------------------------------------------------------------------------------------------------------------------------------------Sub SetPermissionCombos ( nObj_id, _bNewGroup, _cIsRoleVariation, _ByRef isVisibleComboDisabled,_ByRef isActiveComboDisabled, _cVisible, _cActive, _ByRef outVisibleCombo, _ByRef outActiveCombo )Dim iDim visText, actText' --- Visible Combo ---For i = 0 To UBound( arrVisiblePermissions ) Step NumberofPermissionFieldsIf arrVisiblePermissions( INXperm_val + i ) = cVisible ThenvisText = arrVisiblePermissions( INXperm_text + i )End IfNextoutVisibleCombo = "<span class='form_iname'>" & visText & "</span>"' --- Active Combo ---For i = 0 To UBound( arrActivePermissions ) Step NumberofPermissionFieldsIf arrActivePermissions( INXperm_val + i ) = cActive ThenactText = arrActivePermissions( INXperm_text + i )End IfNextoutActiveCombo = "<span class='form_iname'>" & actText & "</span>"End Sub'--------------------------------------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------Call GetUserDetails ( parUser_id, objUserCollector )Call GetApplicationDetails ( parApp_id, objAppCollector )Call GetActionDescriptions'----------------------------------------------%><html><head><title>Access Manager</title><link rel="shortcut icon" href="<%=FavIcon%>"/><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="scripts/access_manager.css" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js"></script></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0"><!-- HEADER ++++++++++++++++++++++ --><!--#include file="_header.asp"--><!-- +++++++++++++++++++++++++++++ --><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%" valign="top" background="images/bg_bage_pane.gif"><!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ --><!--#include file="_treeNavigator.asp"--><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --></td><td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td><td width="100%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="9"><tr><td background="images/bg_drk_bage_pane.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td nowrap class="body_txt"><!-- BUTTONS CONTROL +++++++++++++++++++ --><!-- +++++++++++++++++++++++++++++++++++ --></td><td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td></tr></table></td></tr><tr><td class="menu_crumbttl"><%Call RenderTitle ( objUserCollector )%> Application: <%=objAppCollector.Item ("application_name")%></td></tr><tr><td><!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><!-- TAB CONTROLS ++++++++++++++++++++++ --><!--#include file="_tabs_definition.asp"--><%Set objTabControl = New TabControlobjTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleMac/mac_style.html") ) ' Supply tab style definitionobjTabControl.TabStyle = "StyleMac"objTabControl.AddTabDefnition ( arrUserAccount )objTabControl.SelectByName ( "User Permissions" )objTabControl.Render ()%><!-- END OF TAB CONTROLS +++++++++++++++ --><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td><td width="100%" valign="top"><table width="100%" border="0" cellspacing="10" cellpadding="0"><tr><td><!-- TAB DETAILS +++++++++++++++++++++++++++++ --><table width="100%" border="0" cellspacing="3" cellpadding="0"><tr><td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td><td width="20%" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2"><tr><td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Role Name</td></tr></table></td><td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Permissions</td><td width="60%" align="right" background="images/bg_table_col.gif" class="body_col">Description</td></tr><%OraDatabase.Parameters.Add "USER_ID", parUser_id, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "APP_ID", parApp_id, ORAPARM_INPUT, ORATYPE_NUMBERSet rsQry = OraDatabase.DbCreateDynaset( GetQuery ("UserPermissions.sql") , ORADYN_DEFAULT )currObj_id = -1isNewGroup = FALSEisVisibleComboDisabled = ""isActiveComboDisabled = ""While (NOT rsQry.BOF) AND (NOT rsQry.EOF)%><%If currObj_id <> CInt(rsQry("obj_id")) Then%><%isNewGroup = TRUE%><tr><td nowrap colspan="2" class="body_row" bgcolor="F5F5F5"><a href="Control_Privileges.asp?obj_id=<%=rsQry("obj_id")%><%=objPMod.ComposeURLWithout("obj_id")%>" title="See this Control Permissions" class="body_link"><%=LIMG_CONTROL & rsQry("obj_name")%></a></td><td nowrap class="body_row" bgcolor="F5F5F5"></td><td class="body_row" bgcolor="F5F5F5"><%=ActionDescriptions.Item(rsQry("obj_id").Value)%></td></tr><%currObj_id = CInt(rsQry("obj_id"))%><%End If%><%Call SetPermissionCombos ( rsQry("role_id") &"_"& rsQry("obj_id"), _isNewGroup, rsQry("is_role_variation"), _isVisibleComboDisabled, isActiveComboDisabled, _rsQry("visible_value"), rsQry("active_value"), _VisibleCombo, ActiveCombo )%><tr><td align="center"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td><td nowrap class="body_row"><a href="Role_Privileges.asp?role_id=<%=rsQry("role_id")%><%=objPMod.ComposeURLWithout("role_id")%>" title="See this Role Permissions" class="body_link"><%If IsNull( rsQry("is_role_variation") ) Then%><%=LIMG_ROLE%><%Else%><%=LIMG_SPEC_ROLE%><%End If%><%=rsQry("role_name")%></a></td><td class="body_txt" nowrap background='images/bg_bage_pane.gif'> <%=VisibleCombo%> <%=ActiveCombo%> </td><td class="body_rowg"></td></tr><%isNewGroup = FALSErsQry.MoveNext%><tr><td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr><%WEndOraDatabase.Parameters.Remove "USER_ID"OraDatabase.Parameters.Remove "APP_ID"%><tr><td colspan="5" background="images/bg_table_border.gif"><table width="100%" border="0" cellspacing="1" cellpadding="2"><tr><td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr></table></td></tr></table><SPAN class="body_txtg"><b>NOTE:</b> "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.</SPAN><!-- +++++++++++++++++++++++++++++++++++++++++ --></td></tr></table></td><td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td></tr></table><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><br></td></tr></table></td></tr></table><!-- FOOTER ++++++++++++++++++++++ --><!--#include file="_footer.asp"--><!-- +++++++++++++++++++++++++++++ --></body></html><%'------------ RUN AFTER PAGE RENDER -----------'----------------------------------------------%><!--#include file="common/globals_destructor.asp"-->