Work on Impersonation, removed some debug elements

This commit is contained in:
Rick Falkvinge
2017-01-19 00:34:47 +01:00
parent 2bb66ef115
commit 8f8004ea3f
3 changed files with 344 additions and 0 deletions
@@ -0,0 +1,36 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Admin.CommenceImpersonation" CodeFile="CommenceImpersonation.aspx.cs" %>
<%@ Register src="~/Controls/v5/Base/FileUpload.ascx" tagname="FileUpload" tagprefix="Swarmops5" %>
<%@ Register TagPrefix="Swarmops5" TagName="ComboPeople" Src="~/Controls/v5/Swarm/ComboPeople.ascx" %>
<%@ Register TagPrefix="Swarmops5" TagName="CurrencyAmount" Src="~/Controls/v5/Financial/CurrencyTextBox.ascx" %>
<asp:Content ID="Content4" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
<script type="text/javascript">
$(document).ready(function () {
});
</script>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<h2><asp:Label runat="server" ID="LabelImpersonationHeader" /></h2>
<asp:Literal runat="server" ID="LiteralImpersonationWarning"/>
<div class="entryFields">
<Swarmops5:ComboPeople ID="ComboPeople" runat="server" />
<asp:Button ID="ButtonImpersonate" runat="server" CssClass="buttonAccentColor NoInputFocus" OnClientClick="dialogBeginImpersonation();" Text="#Impersonate#"/>
</div>
<div class="entryLabels">
<asp:Label runat="server" ID="LabelPerson" />
</div>
<div style="clear:both"></div>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
</asp:Content>
@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Resources;
using System.Web;
using System.Web.Services;
using Swarmops.Interface.Support;
using Swarmops.Logic.Financial;
using Swarmops.Logic.Security;
using Swarmops.Logic.Support;
namespace Swarmops.Frontend.Pages.v5.Admin
{
public partial class CommenceImpersonation : PageV5Base
{
protected void Page_Load (object sender, EventArgs e)
{
PageAccessRequired = new Access (CurrentOrganization, AccessAspect.Participant, AccessType.Write);
if (!Page.IsPostBack)
{
Localize();
}
}
private void Localize()
{
this.LabelImpersonationHeader.Text = Resources.Pages.Admin.CommenceImpersonation_Header;
this.LiteralImpersonationWarning.Text = Resources.Pages.Admin.CommenceImpersonation_Warning;
this.LabelPerson.Text = Resources.Pages.Admin.CommenceImpersonation_Person;
this.ButtonImpersonate.Text = Resources.Pages.Admin.CommenceImpersonation_Impersonate;
}
[WebMethod]
public static AjaxCallResult BeginImpersonation (int personId)
{
throw new NotImplementedException();
}
// ReSharper disable InconsistentNaming
public string Localized_ValidationError_MissingTag
{
get { return JavascriptEscape(Resources.Pages.Financial.FileExpenseClaim_ValidationError_MissingTag); }
}
public string Localized_ValidationError_BankAccount
{
get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankAccount); }
}
public string Localized_ValidationError_BankClearing
{
get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankClearing); }
}
public string Localized_ValidationError_BankName
{
get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankName); }
}
public string Localized_ValidationError_Purpose
{
get { return JavascriptEscape(Resources.Pages.Financial.FileExpenseClaim_ValidationError_Purpose); }
}
public string Localized_ValidationError_Budget
{
get { return JavascriptEscape(Resources.Pages.Financial.RequestCashAdvance_ValidationError_Budget); }
}
public string Localized_ValidationError_Amount
{
get { return JavascriptEscape(String.Format(Resources.Pages.Financial.FileExpenseClaim_ValidationError_Amount, CurrentOrganization.Currency.DisplayCode)); }
}
public string Localized_ValidationError_Documents
{
get { return JavascriptEscape(Resources.Pages.Financial.FileExpenseClaim_ValidationError_Documents); }
}
}
}
+222
View File
@@ -0,0 +1,222 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Swarmops.Frontend.Pages.v5.Admin {
public partial class CommenceImpersonation {
/// <summary>
/// RepeaterTagDropScript control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater RepeaterTagDropScript;
/// <summary>
/// RepeaterErrorCheckTags control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater RepeaterErrorCheckTags;
/// <summary>
/// BoxTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label BoxTitle;
/// <summary>
/// HiddenTagSetIdentifiers control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField HiddenTagSetIdentifiers;
/// <summary>
/// CurrencyAmount control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Swarmops.Frontend.Controls.Financial.CurrencyTextBox CurrencyAmount;
/// <summary>
/// TextPurpose control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextPurpose;
/// <summary>
/// ComboBudgets control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Swarmops.Controls.Financial.ComboBudgets ComboBudgets;
/// <summary>
/// RepeaterTagDrop control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater RepeaterTagDrop;
/// <summary>
/// FileUpload control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Swarmops.Controls.Base.FileUpload FileUpload;
/// <summary>
/// TextBank control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextBank;
/// <summary>
/// TextClearing control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextClearing;
/// <summary>
/// TextAccount control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox TextAccount;
/// <summary>
/// ButtonRequest control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button ButtonImpersonate;
/// <summary>
/// LabelAmount control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelPerson;
/// <summary>
/// LabelPurpose control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelPurpose;
/// <summary>
/// LabelBudget control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelImpersonationHeader;
/// <summary>
/// RepeaterTagLabels control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal LiteralImpersonationWarning;
/// <summary>
/// LabelHeaderImageFiles control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelHeaderImageFiles;
/// <summary>
/// LabelImageFiles control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelImageFiles;
/// <summary>
/// LabelHeaderBankDetails control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelHeaderBankDetails;
/// <summary>
/// LabelBankName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelBankName;
/// <summary>
/// LabelBankClearing control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelBankClearing;
/// <summary>
/// LabelBankAccount control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelBankAccount;
}
}