Fixed more problems with impersonation
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection.Emit;
|
||||
@@ -87,7 +88,11 @@ namespace Swarmops.Logic.Security
|
||||
get { return Organization.FromIdentity (_data.OrganizationId); }
|
||||
}
|
||||
|
||||
public Impersonation Impersonation { get; set; }
|
||||
public Impersonation Impersonation
|
||||
{
|
||||
get { return _data.ActiveImpersonation; }
|
||||
set { _data.ActiveImpersonation = value; }
|
||||
}
|
||||
|
||||
public bool ImpersonationActive { get { return Impersonation != null && Impersonation.ImpersonatedByPersonId != 0; } }
|
||||
|
||||
|
||||
@@ -601,7 +601,7 @@ namespace Swarmops.Frontend.Automation
|
||||
Authority authority =
|
||||
Authority.FromLogin(impersonator, authData.CurrentOrganization);
|
||||
FormsAuthentication.SetAuthCookie(authority.ToEncryptedXml(), false);
|
||||
HttpContext.Current.Response.AppendCookie(new HttpCookie("DashboardMessage", String.Format(Resources.Pages.Admin.CommenceImpersonation_Ended, utcNow)));
|
||||
HttpContext.Current.Response.AppendCookie(new HttpCookie("DashboardMessage", CommonV5.JavascriptEscape(String.Format(Resources.Pages.Admin.CommenceImpersonation_Ended, utcNow))));
|
||||
|
||||
// returning Success will force a reload, resetting dashboard to original user
|
||||
|
||||
|
||||
Reference in New Issue
Block a user