<%@LANGUAGE="VBSCRIPT"%> <% '===================================================== '| | '| User Roles | '| | '===================================================== %> <% Option explicit Response.Expires = 0 %> <% '------------ ACCESS CONTROL ------------------ %> <% '------------ VARIABLE DEFINITION ------------- Dim sNode Dim rsQry '------------ CONSTANTS DECLARATION ----------- Const ROW_SEPARATOR = "" '------------ VARIABLE INIT ------------------- '------------ CONDITIONS ---------------------- '---------------------------------------------- %> <% '------------------------------------------------------------------------------------------------------------------------------------ Sub GroupByApplication ( rsQry ) %> &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")%> <%=ROW_SEPARATOR%> <%Call GroupByRoles ( rsQry )%> <% End Sub '------------------------------------------------------------------------------------------------------------------------------------ Sub GroupByRoles ( rsQry ) %> <%rsQry.MoveNext%> <%If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then%> <% If NOT IsNull(rsQry("role_id")) Then While (NOT rsQry.BOF) AND (NOT rsQry.EOF) AND (NOT IsNull(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")%> &tree=<%=arrRoot( inxTNid + (nNumberofProperties * 0) )%>_<%=rsQry("app_id")%>_<%=arrAppProperties( inxTNid + (nNumberofProperties * 1) )%><%=objPMod.ComposeURLWithout("tree")%>" title='See this Role Privileges'><%=LIMG_CONTROL%> <%=ROW_SEPARATOR%> <% rsQry.MoveNext WEnd End If rsQry.MovePrevious %> <%Else rsQry.MovePrevious %> <%End If%> <% End Sub '------------------------------------------------------------------------------------------------------------------------------------ %> <% '------------ RUN BEFORE PAGE RENDER ---------- Call GetUserDetails ( parUser_id, objUserCollector ) If (Request("action") <> "") Then '-- Select Action Select Case Request("action") Case "btnRevokeRole" Call OpenInWindow ( "_RevokeRole.asp?role_id_list="& Request("role_id_list") &"&rfile="& SCRIPT_NAME &"&"& objPMod.ComposeURL() ) End Select End If '---------------------------------------------- %> Access Manager
<% '-- Define Action buttons on this tab aTabBtnsDef = Array("btnGrantRole", "btnRevokeRole" ) If Request("app_id") = "" Then objBtnControl.AllActive = "N" End If Call LoadTabActionButtons ( aTabBtnsDef, objBtnControl ) objBtnControl.Render( aTabBtnsDef ) %> <%=PARENT_TITLE%>
<% Set objTabControl = New TabControl objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleMac/mac_style.html") ) ' Supply tab style definition objTabControl.TabStyle = "StyleMac" objTabControl.AddTabDefnition ( arrUserAccount ) objTabControl.SelectByName ( "Roles" ) objTabControl.SetImgSelected "User Privileges", "icons/ai_major_problem.gif" objTabControl.SetImgDeselected "User Privileges", "icons/ai_major_problem.gif" objTabControl.SetHint "User Privileges", "Some Comments" objTabControl.Render () %>
<% OraDatabase.Parameters.Add "USER_ID", parUser_id, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "APP_ID", parApp_id, ORAPARM_INPUT, ORATYPE_NUMBER Dim tempCnt tempCnt = 0 Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("UserRoles.sql") , ORADYN_DEFAULT ) While (NOT rsQry.BOF) AND (NOT rsQry.EOF) AND (tempCnt < 50) Call GroupByApplication ( rsQry ) rsQry.MoveNext tempCnt = tempCnt + 1 WEnd OraDatabase.Parameters.Remove "USER_ID" OraDatabase.Parameters.Remove "APP_ID" %> <%=objPMod.ComposeHiddenTags()%>
Role
Application
NOTE: "User Specific" Role (<%=LIMG_SPEC_ROLE%>), will overwrite the permissions given by other roles.

<% '------------ RUN AFTER PAGE RENDER ----------- '---------------------------------------------- %>