Report abuse

<%@LANGUAGE = "VBScript"%>
<!--#include file="umraglobal.inc"-->

<%
InitUmra
AuthorizeUser False

If Session("WebRole") <> "MANAGEMENT" then response.redirect "not-allowed.asp"
Session("UserObjectODN") = Request.Form("User")
RetVal = Umra.SetVariableText("%ObjectODN%", Request.Form("User"))
RetVal = Umra.ExecuteProjectScript("function-user-get-info")
RetVal = Umra.GetVariableText("%AD_username%", AD_username)
RetVal = Umra.GetVariableText("%AD_displayName%", AD_displayName)
RetVal = Umra.GetVariableText("%BO4_func_kd%", BO4_func_kd)
RetVal = Umra.GetVariableText("%BO4_func_oms%", BO4_func_oms)
RetVal = Umra.GetVariableText("%BO4_regio_code%", BO4_regio_code)
RetVal = Umra.GetVariableText("%BO4_regio_naam%", BO4_regio_naam)
RetVal = Umra.GetVariableText("%BO4_oe_kort_nm%", BO4_oe_kort_nm)
RetVal = Umra.GetVariableText("%BO4_oe_vol_nm%", BO4_oe_vol_nm)
RetVal = Umra.SetVariableText("%regio_code%", "%BO4_regio_code%")
RetVal = Umra.SetVariableText("%func_kd%", "%BO4_func_kd%")
Set DefaultPermissionTable = Server.CreateObject("UMRAcom.UmraDataTable")
Set JoinedApplPermissionTable = Server.CreateObject("UMRAcom.UmraDataTable")
Set JoinedNTFSPermissionTable = Server.CreateObject("UMRAcom.UmraDataTable")
RetVal = Umra.ExecuteProjectScript("web-generate-default-permission-table")
RetVal = Umra.GetVariableDataTable("%DefaultPermissionTable%", DefaultPermissionTable)
RetVal = Umra.GetVariableDataTable("%JoinedApplPermissionTable%", JoinedApplPermissionTable)
RetVal = Umra.GetVariableDataTable("%JoinedNTFSPermissionTable%", JoinedNTFSPermissionTable)
%>

<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="style.css" type=text/css rel=stylesheet>
</HEAD>

<%
HtmlWriteStyleElement_Top "Toevoegen autorisaties aan gebruiker"
%>

<table width="100%"  border="0" cellpadding="10" cellspacing="0">
  <tr>
    <td>
  <FORM NAME=UmraForm ACTION="manage-authorizations-confirm.asp" METHOD="POST" ID="Form1">
  <table width="100%"  border="0" cellpadding="3" cellspacing="0">
    <tr>
      <td colspan="2"><strong>Gegevens geselecteerde gebruiker:</strong></td>
    </tr>
    <tr>
      <td width="50%">Naam: <% response.write AD_displayName & " (" & AD_username & ")"%></td>
      <td width="50%">Functie: <% response.write BO4_func_oms & " (" & BO4_func_kd & ")"%></td>
    </tr>
    <tr>
      <td width="50%">Afdeling (code): <% response.write BO4_oe_kort_nm%></td>
      <td width="50%">Afdeling (naam): <% response.write BO4_oe_vol_nm%></td>
    </tr>
    <tr>
      <td width="50%">Regio (code): <% response.write BO4_regio_code%></td>
      <td width="50%">Regio (naam): <% response.write BO4_regio_naam%></td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>    
    <tr>
      <td colspan="2"><strong>Standaard toegewezen rol:</strong></td>
    </tr>
    <tr>
      <td colspan="2">
      <%
      RowIndex = 0
      RetVal = DefaultPermissionTable.GetCellText(RowIndex,0,Column0)
      RetVal = DefaultPermissionTable.GetCellText(RowIndex,1,Column1)
      while (RetVal = 0)
        Response.Write Column1
        Response.Write "<BR>"
        RowIndex=RowIndex+1
        RetVal = DefaultPermissionTable.GetCellText(RowIndex,0,Column0)
        RetVal = DefaultPermissionTable.GetCellText(RowIndex,1,Column1)
      wend
      %>
      </td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>    
    <tr>
      <td><strong>Applicatie autorisaties:</strong></td>
      <td><strong>Map autorisaties (Wijzigen / Lezen & Uitvoeren):</strong></td>
    </tr>
    <tr>
      <td>
      <%
      RowIndex = 0
      RetVal = JoinedApplPermissionTable.GetCellText(RowIndex,0,name)
      RetVal = JoinedApplPermissionTable.GetCellText(RowIndex,1,cn)
      RetVal = JoinedApplPermissionTable.GetCellText(RowIndex,5,JoinResult)
      RetVal = JoinedApplPermissionTable.GetCellText(RowIndex,8,JoinResult1)
      while (RetVal = 0)
        if not joinresult1 = 2 then
        Response.Write "<input type='checkbox' value='" & cn & "' name='chkAppl_" & RowIndex & "' id='chkAppl" & RowIndex & "'"
          if JoinResult = 0 then 
            response.write " checked disabled> " & name & "<BR>"
            response.write "<input type='hidden' value='" & cn & "' name='chkAppl_" & RowIndex & "' id='chkAppl" & RowIndex & "'>"
          elseif JoinResult1 = 0 then 
            response.write " checked> " & name & "<BR>"
          else
            response.write "> " & name & "<BR>"
          end if
        end if
        Session("UBoundTable1") = RowIndex
        RowIndex=RowIndex+1
        RetVal = JoinedApplPermissionTable.GetCellText(RowIndex,0,name)
        RetVal = JoinedApplPermissionTable.GetCellText(RowIndex,1,cn)
        RetVal = JoinedApplPermissionTable.GetCellText(RowIndex,5,JoinResult)
        RetVal = JoinedApplPermissionTable.GetCellText(RowIndex,8,JoinResult1)
      wend
      %>  
      </td>
      <td>
      <%
      RowIndex = 0
      RetVal = JoinedNTFSPermissionTable.GetCellText(RowIndex,0,name)
      RetVal = JoinedNTFSPermissionTable.GetCellText(RowIndex,1,cn)
      RetVal = JoinedNTFSPermissionTable.GetCellText(RowIndex,5,JoinResult)
      RetVal = JoinedNTFSPermissionTable.GetCellText(RowIndex,8,JoinResult1)
      name = replace(name, " RX", "")
      while (RetVal = 0)
        if not joinresult1 = 2 then
          Response.Write "<input type='checkbox' value='" & cn & "' name='chkNTFS_" & RowIndex & "' id='chkNTFS" & RowIndex & "'"
          if JoinResult = 0 then 
            response.write " checked disabled> "
            response.write "<input type='hidden' value='" & cn & "' name='chkNTFS_" & RowIndex & "' id='chkNTFS_" & RowIndex & "'>"
          elseif JoinResult1 = 0 then 
            response.write " checked> "
          else
            response.write "> "
          end if
          if InStr(cn, ".RX") > 0 then response.write name & "<BR>"
        end if
        Session("UBoundTable2") = RowIndex
        RowIndex=RowIndex+1
        RetVal = JoinedNTFSPermissionTable.GetCellText(RowIndex,0,name)
        RetVal = JoinedNTFSPermissionTable.GetCellText(RowIndex,1,cn)
        RetVal = JoinedNTFSPermissionTable.GetCellText(RowIndex,5,JoinResult)
        RetVal = JoinedNTFSPermissionTable.GetCellText(RowIndex,8,JoinResult1)
        name = replace(name, " RX", "")
      wend
      %>  
      </td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>    
    <tr>
      <td colspan="2">De autorisaties die bij de standaard toegewezen rol horen zijn reeds aangevinkt, deze kunnen niet aangepast worden.</td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2"><input type="submit" value="Volgende ->" name="Submit"></td>
    </tr>    
    </table>
  </form>
  </td>
  </tr>
</table>