adds a logout.aspx for legacy reasons in case an inline page redirects to there

This commit is contained in:
Shannon
2013-10-16 13:33:08 +11:00
parent 93d44df72b
commit 6400e7988f
2 changed files with 38 additions and 0 deletions

View File

@@ -605,6 +605,7 @@
<DependentUpon>treeInit.aspx</DependentUpon>
</Compile>
<Content Include="Umbraco\create.aspx" />
<Content Include="Umbraco\Logout.aspx" />
<Content Include="Umbraco_Client\IconPicker\iconpicker.js" />
<Content Include="Config\Splashes\booting.aspx" />
<Content Include="Config\Splashes\noNodes.aspx" />

View File

@@ -0,0 +1,37 @@
<%@ Page Language="C#" %>
<%@ Import Namespace="Umbraco.Core" %>
<%@ Import Namespace="Umbraco.Core.IO" %>
<%@ Import Namespace="Umbraco.Web" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
// This page is here purely to deal with legacy logout redirects.
/// <summary>
///
/// </summary>
/// <param name="e"></param>
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
//ensure the person is definitely logged out
UmbracoContext.Current.Security.ClearCurrentLogin();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Logout</title>
<script type="text/javascript">
//if this is not the top window, we'll assume we're in an iframe
// so we actually won't do anything. Otherwise if this is the top window
// we'll redirect to the login dialog
if (window == top) {
document.location.href = '<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco).EnsureEndsWith('/') + "#/login" %>';
}
</script>
</head>
<body>
</body>
</html>