From 8f8004ea3f0013f944aeb5d9dfdb9cd3c3644d8f Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 19 Jan 2017 00:34:47 +0100 Subject: [PATCH] Work on Impersonation, removed some debug elements --- .../Pages/v5/Admin/CommenceImpersonation.aspx | 36 +++ .../v5/Admin/CommenceImpersonation.aspx.cs | 86 +++++++ .../CommenceImpersonation.aspx.designer.cs | 222 ++++++++++++++++++ 3 files changed, 344 insertions(+) create mode 100644 Site/Pages/v5/Admin/CommenceImpersonation.aspx create mode 100644 Site/Pages/v5/Admin/CommenceImpersonation.aspx.cs create mode 100644 Site/Pages/v5/Admin/CommenceImpersonation.aspx.designer.cs diff --git a/Site/Pages/v5/Admin/CommenceImpersonation.aspx b/Site/Pages/v5/Admin/CommenceImpersonation.aspx new file mode 100644 index 00000000..aa9567db --- /dev/null +++ b/Site/Pages/v5/Admin/CommenceImpersonation.aspx @@ -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" %> + + + + + + + + +

+ +
+ + +
+ +
+
+ + + + + + diff --git a/Site/Pages/v5/Admin/CommenceImpersonation.aspx.cs b/Site/Pages/v5/Admin/CommenceImpersonation.aspx.cs new file mode 100644 index 00000000..51528552 --- /dev/null +++ b/Site/Pages/v5/Admin/CommenceImpersonation.aspx.cs @@ -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); } + } + + } +} \ No newline at end of file diff --git a/Site/Pages/v5/Admin/CommenceImpersonation.aspx.designer.cs b/Site/Pages/v5/Admin/CommenceImpersonation.aspx.designer.cs new file mode 100644 index 00000000..8ff9ecbd --- /dev/null +++ b/Site/Pages/v5/Admin/CommenceImpersonation.aspx.designer.cs @@ -0,0 +1,222 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Swarmops.Frontend.Pages.v5.Admin { + + + public partial class CommenceImpersonation { + + /// + /// RepeaterTagDropScript control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater RepeaterTagDropScript; + + /// + /// RepeaterErrorCheckTags control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater RepeaterErrorCheckTags; + + /// + /// BoxTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label BoxTitle; + + /// + /// HiddenTagSetIdentifiers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField HiddenTagSetIdentifiers; + + /// + /// CurrencyAmount control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::Swarmops.Frontend.Controls.Financial.CurrencyTextBox CurrencyAmount; + + /// + /// TextPurpose control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextPurpose; + + /// + /// ComboBudgets control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::Swarmops.Controls.Financial.ComboBudgets ComboBudgets; + + /// + /// RepeaterTagDrop control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater RepeaterTagDrop; + + /// + /// FileUpload control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::Swarmops.Controls.Base.FileUpload FileUpload; + + /// + /// TextBank control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextBank; + + /// + /// TextClearing control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextClearing; + + /// + /// TextAccount control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextAccount; + + /// + /// ButtonRequest control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button ButtonImpersonate; + + /// + /// LabelAmount control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelPerson; + + /// + /// LabelPurpose control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelPurpose; + + /// + /// LabelBudget control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelImpersonationHeader; + + /// + /// RepeaterTagLabels control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal LiteralImpersonationWarning; + + /// + /// LabelHeaderImageFiles control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelHeaderImageFiles; + + /// + /// LabelImageFiles control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelImageFiles; + + /// + /// LabelHeaderBankDetails control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelHeaderBankDetails; + + /// + /// LabelBankName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelBankName; + + /// + /// LabelBankClearing control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelBankClearing; + + /// + /// LabelBankAccount control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label LabelBankAccount; + } +}