Compare commits
33
Commits
@@ -16,7 +16,7 @@
|
||||
<tags>umbraco</tags>
|
||||
<dependencies>
|
||||
<group targetFramework="net452">
|
||||
<dependency id="log4net" version="[2.0.8, 3.0.0)" />
|
||||
<dependency id="log4net" version="[2.0.12, 3.0.0)" />
|
||||
<dependency id="Log4Net.Async" version="[2.0.4, 3.0.0)" />
|
||||
<dependency id="Microsoft.AspNet.Mvc" version="[5.2.7, 6.0.0)" />
|
||||
<dependency id="Microsoft.AspNet.WebApi" version="[5.2.7, 6.0.0)" />
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
+2
-2
@@ -11,5 +11,5 @@ using System.Resources;
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyFileVersion("7.15.4")]
|
||||
[assembly: AssemblyInformationalVersion("7.15.4")]
|
||||
[assembly: AssemblyFileVersion("7.15.7")]
|
||||
[assembly: AssemblyInformationalVersion("7.15.7")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
|
||||
{
|
||||
public class UmbracoVersion
|
||||
{
|
||||
private static readonly Version Version = new Version("7.15.4");
|
||||
private static readonly Version Version = new Version("7.15.7");
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current version of Umbraco.
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace Umbraco.Core.Models.Identity
|
||||
{
|
||||
get
|
||||
{
|
||||
var isLocked = (LockoutEndDateUtc.HasValue && LockoutEndDateUtc.Value.ToLocalTime() >= DateTime.Now);
|
||||
var isLocked = (LockoutEndDateUtc.HasValue && LockoutEndDateUtc.Value.ToLocalTime() > DateTime.Now);
|
||||
return isLocked;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ using Umbraco.Core.Persistence.SqlSyntax;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenFifteenFour
|
||||
{
|
||||
[Migration("7.15.4", 1, Constants.System.UmbracoMigrationName)]
|
||||
[Migration("7.15.5", 1, Constants.System.UmbracoMigrationName)]
|
||||
public class PopulateMissingSecurityStamps : MigrationBase
|
||||
{
|
||||
public PopulateMissingSecurityStamps(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger)
|
||||
|
||||
@@ -205,10 +205,16 @@ ORDER BY colName";
|
||||
}
|
||||
|
||||
public Guid CreateLoginSession(int userId, string requestingIpAddress, bool cleanStaleSessions = true)
|
||||
{
|
||||
//TODO: I know this doesn't follow the normal repository conventions which would require us to crete a UserSessionRepository
|
||||
//and also business logic models for these objects but that's just so overkill for what we are doing
|
||||
{
|
||||
//TODO: I know this doesn't follow the normal repository conventions which would require us to crete a UserSessionRepository
|
||||
//and also business logic models for these objects but that's just so overkill for what we are doing
|
||||
//and now that everything is properly in a transaction (Scope) there doesn't seem to be much reason for using that anymore
|
||||
|
||||
if (cleanStaleSessions)
|
||||
{
|
||||
ClearLoginSessions(TimeSpan.FromDays(15));
|
||||
}
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
var dto = new UserLoginDto
|
||||
{
|
||||
@@ -220,11 +226,7 @@ ORDER BY colName";
|
||||
SessionId = Guid.NewGuid()
|
||||
};
|
||||
Database.Insert(dto);
|
||||
|
||||
if (cleanStaleSessions)
|
||||
{
|
||||
ClearLoginSessions(TimeSpan.FromDays(15));
|
||||
}
|
||||
|
||||
|
||||
return dto.SessionId;
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ namespace Umbraco.Core.Security
|
||||
var result = await base.SetLockoutEndDateAsync(userId, lockoutEnd);
|
||||
|
||||
// The way we unlock is by setting the lockoutEnd date to the current datetime
|
||||
if (result.Succeeded && lockoutEnd >= DateTimeOffset.UtcNow)
|
||||
if (result.Succeeded && lockoutEnd > DateTimeOffset.UtcNow)
|
||||
{
|
||||
RaiseAccountLockedEvent(userId);
|
||||
}
|
||||
|
||||
@@ -16,12 +16,6 @@ namespace Umbraco.Core.Serialization
|
||||
{
|
||||
_settings = new JsonSerializerSettings();
|
||||
|
||||
//var customResolver = new CustomIgnoreResolver
|
||||
// {
|
||||
// DefaultMembersSearchFlags = BindingFlags.Instance | BindingFlags.Public
|
||||
// };
|
||||
//_settings.ContractResolver = customResolver;
|
||||
|
||||
var javaScriptDateTimeConverter = new JavaScriptDateTimeConverter();
|
||||
|
||||
_settings.Converters.Add(javaScriptDateTimeConverter);
|
||||
@@ -61,7 +55,6 @@ namespace Umbraco.Core.Serialization
|
||||
/// <returns></returns>
|
||||
public IStreamedResult ToStream(object input)
|
||||
{
|
||||
var formatting = GlobalSettings.DebugMode ? Formatting.Indented : Formatting.None;
|
||||
string s = JsonConvert.SerializeObject(input, Formatting.Indented, _settings);
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(s);
|
||||
MemoryStream ms = new MemoryStream(bytes);
|
||||
|
||||
@@ -55,8 +55,9 @@
|
||||
<Reference Include="ImageProcessor, Version=2.7.0.100, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
|
||||
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Log4Net.Async, Version=2.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll</HintPath>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<package id="ClientDependency" version="1.9.9" targetFramework="net452" />
|
||||
<package id="HtmlAgilityPack" version="1.8.8" targetFramework="net452" />
|
||||
<package id="ImageProcessor" version="2.7.0.100" targetFramework="net452" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||
<package id="log4net" version="2.0.12" targetFramework="net452" />
|
||||
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.2" targetFramework="net452" />
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Umbraco.Tests.Services
|
||||
|
||||
var found = contentService.GetBlueprintsForContentTypes().ToArray();
|
||||
Assert.AreEqual(1, found.Length);
|
||||
|
||||
|
||||
//ensures it's not found by normal content
|
||||
var contentFound = contentService.GetById(found[0].Id);
|
||||
Assert.IsNull(contentFound);
|
||||
@@ -141,7 +141,7 @@ namespace Umbraco.Tests.Services
|
||||
{
|
||||
var blueprint = MockedContent.CreateTextpageContent(i % 2 == 0 ? ct1 : ct2, "hello" + i, -1);
|
||||
contentService.SaveBlueprint(blueprint);
|
||||
}
|
||||
}
|
||||
|
||||
var found = contentService.GetBlueprintsForContentTypes().ToArray();
|
||||
Assert.AreEqual(10, found.Length);
|
||||
@@ -1287,7 +1287,7 @@ namespace Umbraco.Tests.Services
|
||||
Assert.That(content.Published, Is.True);
|
||||
Assert.That(published, Is.True);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Try to immitate a new child content item being created through the UI.
|
||||
/// This content item will have no Id, Path or Identity.
|
||||
@@ -1301,15 +1301,15 @@ namespace Umbraco.Tests.Services
|
||||
// Arrange
|
||||
var contentService = ServiceContext.ContentService;
|
||||
var content = contentService.CreateContent("Home US", -1, "umbTextpage", 0);
|
||||
content.SetValue("author", "Barack Obama");
|
||||
|
||||
content.SetValue("author", "Barack Obama");
|
||||
|
||||
// Act
|
||||
var published = contentService.SaveAndPublish(content, 0);
|
||||
var childContent = contentService.CreateContent("Child", content.Id, "umbTextpage", 0);
|
||||
// Reset all identity properties
|
||||
var childContent = contentService.CreateContent("Child", content.Id, "umbTextpage", 0);
|
||||
// Reset all identity properties
|
||||
childContent.Id = 0;
|
||||
childContent.Path = null;
|
||||
((Content)childContent).ResetIdentity();
|
||||
childContent.Path = null;
|
||||
((Content)childContent).ResetIdentity();
|
||||
var childPublished = contentService.SaveAndPublish(childContent, 0);
|
||||
|
||||
// Assert
|
||||
@@ -1492,6 +1492,44 @@ namespace Umbraco.Tests.Services
|
||||
Assert.That(trashed.Any(), Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Move_Content_Structure_With_Unpublished_Parent_To_RecycleBin_And_Empty_RecycleBin()
|
||||
{
|
||||
// Arrange
|
||||
var contentService = ServiceContext.ContentService;
|
||||
var contentType = ServiceContext.ContentTypeService.GetContentType("umbTextpage");
|
||||
|
||||
// Publish all the content items in the tree
|
||||
var content = contentService.GetById(NodeDto.NodeIdSeed + 1);
|
||||
contentService.SaveAndPublishWithStatus(content, 0);
|
||||
|
||||
var descendants = contentService.GetDescendants(content).ToList();
|
||||
foreach (var descendant in descendants)
|
||||
contentService.SaveAndPublishWithStatus(descendant, 0);
|
||||
|
||||
var subsubpage = MockedContent.CreateSimpleContent(contentType, "Text Page 3", NodeDto.NodeIdSeed + 2);
|
||||
contentService.SaveAndPublishWithStatus(subsubpage, 0);
|
||||
|
||||
// Unpublish only the parent - see issue https://github.com/umbraco/Umbraco-CMS/issues/8393
|
||||
contentService.UnPublish(content, 0);
|
||||
|
||||
// Act
|
||||
contentService.MoveToRecycleBin(content, 0);
|
||||
descendants = contentService.GetDescendants(content).ToList();
|
||||
|
||||
// Assert
|
||||
Assert.That(content.ParentId, Is.EqualTo(-20));
|
||||
Assert.That(content.Trashed, Is.True);
|
||||
Assert.That(descendants.Count, Is.EqualTo(3));
|
||||
Assert.That(descendants.Any(x => x.Path.Contains("-20") == false), Is.False);
|
||||
|
||||
//Empty Recycle Bin
|
||||
contentService.EmptyRecycleBin();
|
||||
var trashed = contentService.GetContentInRecycleBin();
|
||||
|
||||
Assert.That(trashed.Any(), Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Empty_RecycleBin()
|
||||
{
|
||||
@@ -1521,14 +1559,14 @@ namespace Umbraco.Tests.Services
|
||||
ServiceContext.ContentTypeService.Save(contentType);
|
||||
|
||||
var parentPage = MockedContent.CreateSimpleContent(contentType);
|
||||
ServiceContext.ContentService.Save(parentPage);
|
||||
ServiceContext.ContentService.Save(parentPage);
|
||||
|
||||
var childPage = MockedContent.CreateSimpleContent(contentType, "child", parentPage);
|
||||
ServiceContext.ContentService.Save(childPage);
|
||||
ServiceContext.ContentService.Save(childPage);
|
||||
//assign explicit permissions to the child
|
||||
ServiceContext.ContentService.AssignContentPermission(childPage, 'A', new[] { userGroup.Id });
|
||||
|
||||
//Ok, now copy, what should happen is the childPage will retain it's own permissions
|
||||
ServiceContext.ContentService.AssignContentPermission(childPage, 'A', new[] { userGroup.Id });
|
||||
|
||||
//Ok, now copy, what should happen is the childPage will retain it's own permissions
|
||||
var parentPage2 = MockedContent.CreateSimpleContent(contentType);
|
||||
ServiceContext.ContentService.Save(parentPage2);
|
||||
|
||||
@@ -1565,7 +1603,7 @@ namespace Umbraco.Tests.Services
|
||||
ServiceContext.ContentService.Save(childPage2);
|
||||
var childPage3 = MockedContent.CreateSimpleContent(contentType, "child3", childPage2);
|
||||
ServiceContext.ContentService.Save(childPage3);
|
||||
|
||||
|
||||
//Verify that the children have the inherited permissions
|
||||
var descendants = ServiceContext.ContentService.GetDescendants(parentPage).ToArray();
|
||||
Assert.AreEqual(3, descendants.Length);
|
||||
@@ -1576,7 +1614,7 @@ namespace Umbraco.Tests.Services
|
||||
var allPermissions = permissions.GetAllPermissions().ToArray();
|
||||
Assert.AreEqual(1, allPermissions.Length);
|
||||
Assert.AreEqual("A", allPermissions[0]);
|
||||
}
|
||||
}
|
||||
|
||||
//create a new parent with a new permission structure
|
||||
var parentPage2 = MockedContent.CreateSimpleContent(contentType);
|
||||
@@ -1585,7 +1623,7 @@ namespace Umbraco.Tests.Services
|
||||
|
||||
//Now copy, what should happen is the child pages will now have permissions inherited from the new parent
|
||||
var copy = ServiceContext.ContentService.Copy(childPage1, parentPage2.Id, false, true);
|
||||
|
||||
|
||||
descendants = ServiceContext.ContentService.GetDescendants(parentPage2).ToArray();
|
||||
Assert.AreEqual(3, descendants.Length);
|
||||
|
||||
@@ -1596,7 +1634,7 @@ namespace Umbraco.Tests.Services
|
||||
Assert.AreEqual(1, allPermissions.Length);
|
||||
Assert.AreEqual("B", allPermissions[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Empty_RecycleBin_With_Content_That_Has_All_Related_Data()
|
||||
@@ -1633,11 +1671,11 @@ namespace Umbraco.Tests.Services
|
||||
|
||||
var editorGroup = ServiceContext.UserService.GetUserGroupByAlias("editor");
|
||||
editorGroup.StartContentId = content1.Id;
|
||||
ServiceContext.UserService.Save(editorGroup);
|
||||
ServiceContext.UserService.Save(editorGroup);
|
||||
|
||||
var admin = ServiceContext.UserService.GetUserById(0);
|
||||
admin.StartContentIds = new[] {content1.Id};
|
||||
ServiceContext.UserService.Save(admin);
|
||||
ServiceContext.UserService.Save(admin);
|
||||
|
||||
ServiceContext.RelationService.Save(new RelationType(Constants.ObjectTypes.DocumentGuid, Constants.ObjectTypes.DocumentGuid, "test"));
|
||||
Assert.IsNotNull(ServiceContext.RelationService.Relate(content1, content2, "test"));
|
||||
@@ -2161,4 +2199,4 @@ namespace Umbraco.Tests.Services
|
||||
return repository;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,9 @@
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
|
||||
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Log4Net.Async, Version=2.0.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Log4Net.Async.2.0.4\lib\net40\Log4Net.Async.dll</HintPath>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<package id="Castle.Core" version="4.0.0" targetFramework="net45" />
|
||||
<package id="Examine" version="0.1.90" targetFramework="net45" />
|
||||
<package id="HtmlAgilityPack" version="1.8.8" targetFramework="net452" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||
<package id="log4net" version="2.0.12" targetFramework="net452" />
|
||||
<package id="Log4Net.Async" version="2.0.4" targetFramework="net45" />
|
||||
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net452" />
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"jquery-migrate": "1.4.0",
|
||||
"angular-dynamic-locale": "0.1.28",
|
||||
"ng-file-upload": "~7.3.8",
|
||||
"tinymce": "~4.9.9",
|
||||
"tinymce": "~4.9.10",
|
||||
"codemirror": "~5.3.0",
|
||||
"angular-local-storage": "~0.2.3",
|
||||
"moment": "~2.10.3",
|
||||
@@ -42,7 +42,8 @@
|
||||
"font-awesome",
|
||||
"angular",
|
||||
"bootstrap",
|
||||
"codemirror"
|
||||
"codemirror",
|
||||
"ace-builds"
|
||||
],
|
||||
"sources": {
|
||||
"moment": [
|
||||
|
||||
@@ -31,7 +31,7 @@ var karmaServer = require('karma').Server;
|
||||
Helper functions
|
||||
***************************************************************/
|
||||
function processJs(files, out) {
|
||||
|
||||
|
||||
return gulp.src(files)
|
||||
// check for js errors
|
||||
.pipe(eslint())
|
||||
@@ -58,7 +58,7 @@ function processLess(files, out) {
|
||||
.pipe(postcss(processors))
|
||||
.pipe(rename(out))
|
||||
.pipe(gulp.dest(root + targets.css));
|
||||
|
||||
|
||||
console.log(out + " compiled");
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ Paths and destinations
|
||||
Each group is iterated automatically in the setup tasks below
|
||||
***************************************************************/
|
||||
var sources = {
|
||||
|
||||
|
||||
//less files used by backoffice and preview
|
||||
//processed in the less task
|
||||
less: {
|
||||
@@ -104,7 +104,7 @@ var sources = {
|
||||
js: "./src/*.js",
|
||||
lib: "./lib/**/*",
|
||||
bower: "./lib-bower/**/*",
|
||||
assets: "./src/assets/**"
|
||||
assets: "./src/assets/**"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -140,7 +140,7 @@ gulp.task('docserve', function(cb) {
|
||||
/**************************
|
||||
* Task processes and copies all dependencies, either installed by bower, npm or stored locally in the project
|
||||
**************************/
|
||||
gulp.task('dependencies', function () {
|
||||
gulp.task('dependencies', function () {
|
||||
|
||||
//bower component specific copy rules
|
||||
//this is to patch the sometimes wonky rules these libs are distrbuted under
|
||||
@@ -163,8 +163,9 @@ gulp.task('dependencies', function () {
|
||||
{ base: "./bower_components/font-awesome/" })
|
||||
.pipe(gulp.dest(root + targets.lib + "/font-awesome"))
|
||||
);
|
||||
|
||||
|
||||
// ace Editor
|
||||
console.log(`Copying 'ace-builds' from bower_components/ace-builds/src-min-noconflict/ to ${root + targets.lib + "/ace-builds"}`);
|
||||
stream.add(
|
||||
gulp.src(["bower_components/ace-builds/src-min-noconflict/ace.js",
|
||||
"bower_components/ace-builds/src-min-noconflict/ext-language_tools.js",
|
||||
@@ -199,21 +200,23 @@ gulp.task('dependencies', function () {
|
||||
.pipe(gulp.dest(root + targets.lib + "/codemirror"))
|
||||
);
|
||||
|
||||
//copy over libs which are not on bower (/lib) and
|
||||
//copy over libs which are not on bower (/lib) and
|
||||
//libraries that have been managed by bower-installer (/lib-bower)
|
||||
console.log(`Copying 'lib' ${sources.globs.lib} to ${root + targets.lib}`);
|
||||
stream.add(
|
||||
gulp.src(sources.globs.lib)
|
||||
.pipe(gulp.dest(root + targets.lib))
|
||||
);
|
||||
|
||||
console.log(`Copying 'bower' ${sources.globs.bower} to ${root + targets.lib}`);
|
||||
stream.add(
|
||||
gulp.src(sources.globs.bower)
|
||||
.pipe(gulp.dest(root + targets.lib))
|
||||
);
|
||||
|
||||
//Copies all static assets into /root / assets folder
|
||||
//Copies all static assets into /root / assets folder
|
||||
//css, fonts and image files
|
||||
stream.add(
|
||||
stream.add(
|
||||
gulp.src(sources.globs.assets)
|
||||
.pipe(imagemin([
|
||||
imagemin.gifsicle({interlaced: true}),
|
||||
@@ -231,20 +234,20 @@ gulp.task('dependencies', function () {
|
||||
|
||||
// Copies all the less files related to the preview into their folder
|
||||
//these are not pre-processed as preview has its own less combiler client side
|
||||
stream.add(
|
||||
stream.add(
|
||||
gulp.src("src/canvasdesigner/editors/*.less")
|
||||
.pipe(gulp.dest(root + targets.assets + "/less"))
|
||||
);
|
||||
|
||||
|
||||
// Todo: check if we need these fileSize
|
||||
stream.add(
|
||||
stream.add(
|
||||
gulp.src("src/views/propertyeditors/grid/config/*.*")
|
||||
.pipe(gulp.dest(root + targets.views + "/propertyeditors/grid/config"))
|
||||
);
|
||||
stream.add(
|
||||
);
|
||||
stream.add(
|
||||
gulp.src("src/views/dashboard/default/*.jpg")
|
||||
.pipe(gulp.dest(root + targets.views + "/dashboard/default"))
|
||||
);
|
||||
);
|
||||
|
||||
return stream;
|
||||
});
|
||||
@@ -253,8 +256,8 @@ gulp.task('dependencies', function () {
|
||||
/**************************
|
||||
* Copies all angular JS files into their seperate umbraco.*.js file
|
||||
**************************/
|
||||
gulp.task('js', function () {
|
||||
|
||||
gulp.task('js', function () {
|
||||
|
||||
//we run multiple streams, so merge them all together
|
||||
var stream = new MergeStream();
|
||||
|
||||
@@ -271,7 +274,7 @@ gulp.task('js', function () {
|
||||
});
|
||||
|
||||
gulp.task('less', function () {
|
||||
|
||||
|
||||
var stream = new MergeStream();
|
||||
|
||||
_.forEach(sources.less, function (group) {
|
||||
@@ -294,9 +297,9 @@ gulp.task('views', function () {
|
||||
gulp.src(group.files)
|
||||
.pipe( gulp.dest(root + targets.views + group.folder) )
|
||||
);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
return stream;
|
||||
});
|
||||
|
||||
@@ -311,13 +314,13 @@ gulp.task('watch', function () {
|
||||
|
||||
if(group.watch !== false){
|
||||
|
||||
stream.add(
|
||||
stream.add(
|
||||
|
||||
watch(group.files, { ignoreInitial: true, interval: watchInterval }, function (file) {
|
||||
|
||||
console.info(file.path + " has changed, added to: " + group.out);
|
||||
processJs(group.files, group.out);
|
||||
|
||||
|
||||
})
|
||||
|
||||
);
|
||||
@@ -326,7 +329,7 @@ gulp.task('watch', function () {
|
||||
|
||||
});
|
||||
|
||||
stream.add(
|
||||
stream.add(
|
||||
//watch all less files and trigger the less task
|
||||
watch(sources.globs.less, { ignoreInitial: true, interval: watchInterval }, function () {
|
||||
gulp.run(['less']);
|
||||
@@ -334,13 +337,13 @@ gulp.task('watch', function () {
|
||||
);
|
||||
|
||||
//watch all views - copy single file changes
|
||||
stream.add(
|
||||
stream.add(
|
||||
watch(sources.globs.views, { interval: watchInterval })
|
||||
.pipe(gulp.dest(root + targets.views))
|
||||
);
|
||||
|
||||
//watch all app js files that will not be merged - copy single file changes
|
||||
stream.add(
|
||||
stream.add(
|
||||
watch(sources.globs.js, { interval: watchInterval })
|
||||
.pipe(gulp.dest(root + targets.js))
|
||||
);
|
||||
@@ -385,7 +388,7 @@ gulp.task('connect:docs', function (cb) {
|
||||
});
|
||||
|
||||
gulp.task('open:docs', function (cb) {
|
||||
|
||||
|
||||
var options = {
|
||||
uri: 'http://localhost:8880/index.html'
|
||||
};
|
||||
|
||||
@@ -293,6 +293,8 @@ ngMobile.directive('ngClick', ['$parse', '$timeout', '$rootElement',
|
||||
* A leftward swipe is a quick, right-to-left slide of the finger.
|
||||
* Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag too.
|
||||
*
|
||||
* [well, it did until we disabled that feature to avoid problems with selecting text]
|
||||
*
|
||||
* @element ANY
|
||||
* @param {expression} ngSwipeLeft {@link guide/expression Expression} to evaluate
|
||||
* upon left swipe. (Event object is available as `$event`)
|
||||
@@ -388,7 +390,7 @@ function makeSwipeDirective(directiveName, direction) {
|
||||
deltaY / deltaX < MAX_VERTICAL_RATIO;
|
||||
}
|
||||
|
||||
element.bind('touchstart mousedown', function(event) {
|
||||
element.bind('touchstart', function(event) {
|
||||
startCoords = getCoordinates(event);
|
||||
valid = true;
|
||||
totalX = 0;
|
||||
@@ -401,7 +403,7 @@ function makeSwipeDirective(directiveName, direction) {
|
||||
valid = false;
|
||||
});
|
||||
|
||||
element.bind('touchmove mousemove', function(event) {
|
||||
element.bind('touchmove', function(event) {
|
||||
if (!valid) return;
|
||||
|
||||
// Android will send a touchcancel if it thinks we're starting to scroll.
|
||||
@@ -440,7 +442,7 @@ function makeSwipeDirective(directiveName, direction) {
|
||||
}
|
||||
});
|
||||
|
||||
element.bind('touchend mouseup', function(event) {
|
||||
element.bind('touchend', function(event) {
|
||||
if (validSwipe(event)) {
|
||||
// Prevent this swipe from bubbling up to any other elements with ngSwipes.
|
||||
event.stopPropagation();
|
||||
|
||||
+296
-84
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 99 KiB |
@@ -186,7 +186,9 @@ function listViewController($rootScope, $scope, $routeParams, $injector, $cookie
|
||||
|
||||
// Another special case for members, only fields on the base table (cmsMember) can be used for sorting
|
||||
if (e.isSystem && $scope.entityType == "member") {
|
||||
e.allowSorting = e.alias == 'username' || e.alias == 'email';
|
||||
e.allowSorting = e.alias == 'username' ||
|
||||
e.alias == 'email' ||
|
||||
e.alias == 'updateDate';
|
||||
}
|
||||
|
||||
if (e.isSystem) {
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
ng-model="$parent.tagToAdd"
|
||||
ng-keydown="$parent.addTagOnEnter($event)"
|
||||
on-blur="$parent.addTag()"
|
||||
ng-maxlength="200"
|
||||
maxlength="200"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_enterTags" />
|
||||
|
||||
|
||||
@@ -126,8 +126,8 @@
|
||||
<HintPath>..\packages\ClientDependency.1.9.9\lib\net45\ClientDependency.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ClientDependency.Core.Mvc, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll</HintPath>
|
||||
<Reference Include="ClientDependency.Core.Mvc, Version=1.9.3.0, Culture=neutral, PublicKeyToken=null">
|
||||
<HintPath>..\packages\ClientDependency-Mvc5.1.9.3\lib\net45\ClientDependency.Core.Mvc.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="dotless.Core, Version=1.5.2.0, Culture=neutral, PublicKeyToken=96b446c9e63eae34, processorArchitecture=MSIL">
|
||||
@@ -145,8 +145,9 @@
|
||||
<Reference Include="ImageProcessor.Web, Version=4.10.0.100, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageProcessor.Web.4.10.0.100\lib\net452\ImageProcessor.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
|
||||
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lucene.Net, Version=2.9.4.1, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Lucene.Net.2.9.4.1\lib\net40\Lucene.Net.dll</HintPath>
|
||||
@@ -1029,9 +1030,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\"
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>7154</DevelopmentServerPort>
|
||||
<DevelopmentServerPort>7157</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:7154</IISUrl>
|
||||
<IISUrl>http://localhost:7157</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
|
||||
|
||||
<%
|
||||
// NH: Adds this inline check to avoid a simple codebehind file in the legacy project!
|
||||
if (Request["url"].ToLower().Contains("booting.aspx") || !umbraco.cms.helpers.url.ValidateProxyUrl(Request["url"], Request.Url.AbsoluteUri))
|
||||
var url = Request.QueryString["url"];
|
||||
var isUrlLocal = System.Web.WebPages.RequestExtensions.IsUrlLocalToHost(null, url);
|
||||
if (url.ToLower().Contains("booting.aspx") || isUrlLocal == false)
|
||||
{
|
||||
throw new ArgumentException("Can't redirect to the requested url - it's not local or an approved proxy url",
|
||||
"url");
|
||||
throw new ArgumentException("Can't redirect to the requested url - it's not local", "url");
|
||||
}
|
||||
%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>The website is restarting</title>
|
||||
<meta http-equiv="REFRESH" content="10; URL=<%=Request["url"] %>">
|
||||
<meta http-equiv="REFRESH" content="10; URL=<%=url %>">
|
||||
</head>
|
||||
<body>
|
||||
<h1>The website is restarting</h1>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<packages>
|
||||
<package id="AutoMapper" version="3.3.1" targetFramework="net45" />
|
||||
<package id="ClientDependency" version="1.9.9" targetFramework="net452" />
|
||||
<package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net45" />
|
||||
<package id="ClientDependency-Mvc5" version="1.9.3" targetFramework="net452" />
|
||||
<package id="dotless" version="1.5.2" targetFramework="net45" />
|
||||
<package id="Examine" version="0.1.90" targetFramework="net45" />
|
||||
<package id="ImageProcessor" version="2.7.0.100" targetFramework="net452" />
|
||||
<package id="ImageProcessor.Web" version="4.10.0.100" targetFramework="net452" />
|
||||
<package id="ImageProcessor.Web.Config" version="2.5.0.100" targetFramework="net452" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||
<package id="log4net" version="2.0.12" targetFramework="net452" />
|
||||
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.2" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.2" targetFramework="net452" />
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
xdt:Locator="Condition(_defaultNamespace:assemblyIdentity[@name='log4net']])" />
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0"/>
|
||||
</dependentAssembly>
|
||||
|
||||
</assemblyBinding>
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral"/>
|
||||
|
||||
@@ -62,7 +62,8 @@ namespace Umbraco.Web.Cache
|
||||
{
|
||||
Id = x.Id,
|
||||
Key = x.Key,
|
||||
Operation = operationType
|
||||
Operation = operationType,
|
||||
IsBlueprint = x.IsBlueprint
|
||||
}).ToArray();
|
||||
var json = JsonConvert.SerializeObject(items);
|
||||
return json;
|
||||
@@ -83,6 +84,7 @@ namespace Umbraco.Web.Cache
|
||||
public int Id { get; set; }
|
||||
public Guid? Key { get; set; }
|
||||
public OperationType Operation { get; set; }
|
||||
public bool? IsBlueprint { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -102,10 +104,18 @@ namespace Umbraco.Web.Cache
|
||||
ClearRepositoryCacheItemById(id);
|
||||
ClearAllIsolatedCacheByEntityType<PublicAccessEntry>();
|
||||
content.Instance.UpdateSortOrder(id);
|
||||
var d = new Document(id);
|
||||
content.Instance.UpdateDocumentCache(d);
|
||||
content.Instance.UpdatePreviewXmlContent(d);
|
||||
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
|
||||
Document d = null;
|
||||
try
|
||||
{
|
||||
d = new Document(id);
|
||||
}
|
||||
catch (Exception){ } // not a document, cannot continue
|
||||
if (d != null)
|
||||
{
|
||||
content.Instance.UpdateDocumentCache(d);
|
||||
content.Instance.UpdatePreviewXmlContent(d);
|
||||
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
|
||||
}
|
||||
base.Refresh(id);
|
||||
}
|
||||
|
||||
@@ -124,11 +134,14 @@ namespace Umbraco.Web.Cache
|
||||
{
|
||||
ClearRepositoryCacheItemById(instance.Id);
|
||||
ClearAllIsolatedCacheByEntityType<PublicAccessEntry>();
|
||||
content.Instance.UpdateSortOrder(instance);
|
||||
var d = new Document(instance);
|
||||
content.Instance.UpdateDocumentCache(d);
|
||||
content.Instance.UpdatePreviewXmlContent(d);
|
||||
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
|
||||
if (!instance.IsBlueprint)
|
||||
{
|
||||
content.Instance.UpdateSortOrder(instance);
|
||||
var d = new Document(instance);
|
||||
content.Instance.UpdateDocumentCache(d);
|
||||
content.Instance.UpdatePreviewXmlContent(d);
|
||||
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
|
||||
}
|
||||
base.Refresh(instance);
|
||||
}
|
||||
|
||||
@@ -136,9 +149,12 @@ namespace Umbraco.Web.Cache
|
||||
{
|
||||
ApplicationContext.Current.Services.IdkMap.ClearCache(instance.Id);
|
||||
ClearRepositoryCacheItemById(instance.Id);
|
||||
ClearAllIsolatedCacheByEntityType<PublicAccessEntry>();
|
||||
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
|
||||
content.Instance.ClearPreviewXmlContent(instance.Id);
|
||||
if (!instance.IsBlueprint)
|
||||
{
|
||||
ClearAllIsolatedCacheByEntityType<PublicAccessEntry>();
|
||||
DistributedCache.Instance.ClearDomainCacheOnCurrentServer();
|
||||
content.Instance.ClearPreviewXmlContent(instance.Id);
|
||||
}
|
||||
base.Remove(instance);
|
||||
}
|
||||
|
||||
@@ -164,11 +180,31 @@ namespace Umbraco.Web.Cache
|
||||
}
|
||||
|
||||
if (payload.Operation == OperationType.Refresh)
|
||||
{
|
||||
content.Instance.UpdateSortOrder(payload.Id);
|
||||
var d = new Document(payload.Id);
|
||||
content.Instance.UpdateDocumentCache(d);
|
||||
content.Instance.UpdatePreviewXmlContent(d);
|
||||
{
|
||||
if (!payload.IsBlueprint.HasValue)
|
||||
{
|
||||
// if this is null (since it was added later) then we need to try/catch since we don't know what it is
|
||||
Document d = null;
|
||||
try
|
||||
{
|
||||
d = new Document(payload.Id);
|
||||
}
|
||||
catch (Exception) { } // not a document, cannot continue
|
||||
if (d != null)
|
||||
{
|
||||
content.Instance.UpdateSortOrder(payload.Id);
|
||||
content.Instance.UpdateDocumentCache(d);
|
||||
content.Instance.UpdatePreviewXmlContent(d);
|
||||
}
|
||||
}
|
||||
else if (!payload.IsBlueprint.Value)
|
||||
{
|
||||
// if it's not a blueprint, then need to refresh the published cache
|
||||
var d = new Document(payload.Id);
|
||||
content.Instance.UpdateSortOrder(payload.Id);
|
||||
content.Instance.UpdateDocumentCache(d);
|
||||
content.Instance.UpdatePreviewXmlContent(d);
|
||||
}
|
||||
|
||||
base.Refresh(payload.Id);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Umbraco.Web.Editors
|
||||
Core.Constants.Security.BackOfficeAuthenticationType,
|
||||
Core.Constants.Security.BackOfficeExternalAuthenticationType);
|
||||
}
|
||||
|
||||
|
||||
if (invite == null)
|
||||
{
|
||||
Logger.Warn<BackOfficeController>("VerifyUser endpoint reached with invalid token: NULL");
|
||||
@@ -143,10 +143,10 @@ namespace Umbraco.Web.Editors
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This Action is used by the installer when an upgrade is detected but the admin user is not logged in. We need to
|
||||
/// This Action is used by the installer when an upgrade is detected but the admin user is not logged in. We need to
|
||||
/// ensure the user is authenticated before the install takes place so we redirect here to show the standard login screen.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> AuthorizeUpgrade()
|
||||
{
|
||||
@@ -177,7 +177,6 @@ namespace Umbraco.Web.Editors
|
||||
//the dictionary returned is fine but the delimiter between an 'area' and a 'value' is a '/' but the javascript
|
||||
// in the back office requres the delimiter to be a '_' so we'll just replace it
|
||||
.ToDictionary(key => key.Key.Replace("/", "_"), val => val.Value);
|
||||
var formatting = GlobalSettings.DebugMode ? Formatting.Indented : Formatting.None;
|
||||
return new JsonNetResult { Data = textForCulture, Formatting = Formatting.Indented };
|
||||
}
|
||||
|
||||
@@ -230,7 +229,6 @@ namespace Umbraco.Web.Editors
|
||||
typeof(BackOfficeController) + "GetManifestAssetList",
|
||||
() => getResult(),
|
||||
new TimeSpan(0, 10, 0));
|
||||
var formatting = GlobalSettings.DebugMode ? Formatting.Indented : Formatting.None;
|
||||
return new JsonNetResult { Data = result, Formatting = Formatting.Indented };
|
||||
}
|
||||
|
||||
@@ -244,11 +242,10 @@ namespace Umbraco.Web.Editors
|
||||
new DirectoryInfo(Server.MapPath(SystemDirectories.AppPlugins)),
|
||||
new DirectoryInfo(Server.MapPath(SystemDirectories.Config)),
|
||||
HttpContext.IsDebuggingEnabled);
|
||||
var formatting = GlobalSettings.DebugMode ? Formatting.Indented : Formatting.None;
|
||||
return new JsonNetResult { Data = gridConfig.EditorsConfig.Editors, Formatting = Formatting.Indented };
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JavaScript object representing the static server variables javascript object
|
||||
@@ -271,7 +268,7 @@ namespace Umbraco.Web.Editors
|
||||
return JavaScript(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult ExternalLogin(string provider, string redirectUrl = null)
|
||||
@@ -341,10 +338,10 @@ namespace Umbraco.Web.Editors
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used by Default and AuthorizeUpgrade to render as per normal if there's no external login info,
|
||||
/// Used by Default and AuthorizeUpgrade to render as per normal if there's no external login info,
|
||||
/// otherwise process the external login info.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <returns></returns>
|
||||
private async Task<ActionResult> RenderDefaultOrProcessExternalLoginAsync(
|
||||
Func<ActionResult> defaultResponse,
|
||||
Func<ActionResult> externalSignInResponse)
|
||||
@@ -384,9 +381,9 @@ namespace Umbraco.Web.Editors
|
||||
ExternalSignInAutoLinkOptions autoLinkOptions = null;
|
||||
|
||||
//Here we can check if the provider associated with the request has been configured to allow
|
||||
// new users (auto-linked external accounts). This would never be used with public providers such as
|
||||
// new users (auto-linked external accounts). This would never be used with public providers such as
|
||||
// Google, unless you for some reason wanted anybody to be able to access the backend if they have a Google account
|
||||
// .... not likely!
|
||||
// .... not likely!
|
||||
var authType = OwinContext.Authentication.GetExternalAuthenticationTypes().FirstOrDefault(x => x.AuthenticationType == loginInfo.Login.LoginProvider);
|
||||
if (authType == null)
|
||||
{
|
||||
@@ -401,10 +398,10 @@ namespace Umbraco.Web.Editors
|
||||
var user = await UserManager.FindAsync(loginInfo.Login);
|
||||
if (user != null)
|
||||
{
|
||||
//TODO: It might be worth keeping some of the claims associated with the ExternalLoginInfo, in which case we
|
||||
// wouldn't necessarily sign the user in here with the standard login, instead we'd update the
|
||||
//TODO: It might be worth keeping some of the claims associated with the ExternalLoginInfo, in which case we
|
||||
// wouldn't necessarily sign the user in here with the standard login, instead we'd update the
|
||||
// UseUmbracoBackOfficeExternalCookieAuthentication extension method to have the correct provider and claims factory,
|
||||
// ticket format, etc.. to create our back office user including the claims assigned and in this method we'd just ensure
|
||||
// ticket format, etc.. to create our back office user including the claims assigned and in this method we'd just ensure
|
||||
// that the ticket is created and stored and that the user is logged in.
|
||||
|
||||
var shouldSignIn = true;
|
||||
@@ -477,7 +474,7 @@ namespace Umbraco.Web.Editors
|
||||
{
|
||||
autoLinkUser.AddRole(userGroup.Alias);
|
||||
}
|
||||
|
||||
|
||||
//call the callback if one is assigned
|
||||
if (autoLinkOptions.OnAutoLinking != null)
|
||||
{
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace Umbraco.Web.Trees
|
||||
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias)));
|
||||
|
||||
menu.Items.Add(new MenuItem("rename", Services.TextService.Localize(String.Format("actions/{0}", "rename")))
|
||||
menu.Items.Add(new MenuItem("rename", Services.TextService.Localize(String.Format("actions/rename")))
|
||||
{
|
||||
Icon = "icon icon-edit"
|
||||
});
|
||||
|
||||
@@ -1,149 +1,149 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using umbraco.BusinessLogic.Actions;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Search;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
[UmbracoTreeAuthorize(Constants.Trees.DataTypes)]
|
||||
[Tree(Constants.Applications.Developer, Constants.Trees.DataTypes, null, sortOrder:1)]
|
||||
[PluginController("UmbracoTrees")]
|
||||
[CoreTree]
|
||||
public class DataTypeTreeController : TreeController, ISearchableTree
|
||||
{
|
||||
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
|
||||
{
|
||||
var intId = id.TryConvertTo<int>();
|
||||
if (intId == false) throw new InvalidOperationException("Id must be an integer");
|
||||
|
||||
var nodes = new TreeNodeCollection();
|
||||
|
||||
//Folders first
|
||||
nodes.AddRange(
|
||||
Services.EntityService.GetChildren(intId.Result, UmbracoObjectTypes.DataTypeContainer)
|
||||
.OrderBy(entity => entity.Name)
|
||||
.Select(dt =>
|
||||
{
|
||||
var node = CreateTreeNode(dt, Constants.ObjectTypes.DataTypeGuid, id, queryStrings, "icon-folder", dt.HasChildren());
|
||||
node.Path = dt.Path;
|
||||
node.NodeType = "container";
|
||||
//TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now.
|
||||
node.AdditionalData["jsClickCallback"] = "javascript:void(0);";
|
||||
return node;
|
||||
}));
|
||||
|
||||
//if the request is for folders only then just return
|
||||
if (queryStrings["foldersonly"].IsNullOrWhiteSpace() == false && queryStrings["foldersonly"] == "1") return nodes;
|
||||
|
||||
//System ListView nodes
|
||||
var systemListViewDataTypeIds = GetNonDeletableSystemListViewDataTypeIds();
|
||||
|
||||
nodes.AddRange(
|
||||
Services.EntityService.GetChildren(intId.Result, UmbracoObjectTypes.DataType)
|
||||
.OrderBy(entity => entity.Name)
|
||||
.Select(dt =>
|
||||
{
|
||||
var node = CreateTreeNode(dt.Id.ToInvariantString(), id, queryStrings, dt.Name, "icon-autofill", false);
|
||||
node.Path = dt.Path;
|
||||
if (systemListViewDataTypeIds.Contains(dt.Id))
|
||||
{
|
||||
node.Icon = "icon-thumbnail-list";
|
||||
}
|
||||
return node;
|
||||
}));
|
||||
|
||||
return nodes;
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using umbraco.BusinessLogic.Actions;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Search;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
/// <summary>
|
||||
/// Get all integer identifiers for the non-deletable system datatypes.
|
||||
/// </summary>
|
||||
private static IEnumerable<int> GetNonDeletableSystemDataTypeIds()
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
[UmbracoTreeAuthorize(Constants.Trees.DataTypes)]
|
||||
[Tree(Constants.Applications.Developer, Constants.Trees.DataTypes, null, sortOrder:1)]
|
||||
[PluginController("UmbracoTrees")]
|
||||
[CoreTree]
|
||||
public class DataTypeTreeController : TreeController, ISearchableTree
|
||||
{
|
||||
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
|
||||
{
|
||||
var intId = id.TryConvertTo<int>();
|
||||
if (intId == false) throw new InvalidOperationException("Id must be an integer");
|
||||
|
||||
var nodes = new TreeNodeCollection();
|
||||
|
||||
//Folders first
|
||||
nodes.AddRange(
|
||||
Services.EntityService.GetChildren(intId.Result, UmbracoObjectTypes.DataTypeContainer)
|
||||
.OrderBy(entity => entity.Name)
|
||||
.Select(dt =>
|
||||
{
|
||||
var node = CreateTreeNode(dt, Constants.ObjectTypes.DataTypeGuid, id, queryStrings, "icon-folder", dt.HasChildren());
|
||||
node.Path = dt.Path;
|
||||
node.NodeType = "container";
|
||||
//TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now.
|
||||
node.AdditionalData["jsClickCallback"] = "javascript:void(0);";
|
||||
return node;
|
||||
}));
|
||||
|
||||
//if the request is for folders only then just return
|
||||
if (queryStrings["foldersonly"].IsNullOrWhiteSpace() == false && queryStrings["foldersonly"] == "1") return nodes;
|
||||
|
||||
//System ListView nodes
|
||||
var systemListViewDataTypeIds = GetNonDeletableSystemListViewDataTypeIds();
|
||||
|
||||
nodes.AddRange(
|
||||
Services.EntityService.GetChildren(intId.Result, UmbracoObjectTypes.DataType)
|
||||
.OrderBy(entity => entity.Name)
|
||||
.Select(dt =>
|
||||
{
|
||||
var node = CreateTreeNode(dt.Id.ToInvariantString(), id, queryStrings, dt.Name, "icon-autofill", false);
|
||||
node.Path = dt.Path;
|
||||
if (systemListViewDataTypeIds.Contains(dt.Id))
|
||||
{
|
||||
node.Icon = "icon-thumbnail-list";
|
||||
}
|
||||
return node;
|
||||
}));
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all integer identifiers for the non-deletable system datatypes.
|
||||
/// </summary>
|
||||
private static IEnumerable<int> GetNonDeletableSystemDataTypeIds()
|
||||
{
|
||||
var systemIds = new[]
|
||||
{
|
||||
Constants.System.DefaultLabelDataTypeId
|
||||
};
|
||||
|
||||
return systemIds.Concat(GetNonDeletableSystemListViewDataTypeIds());
|
||||
}
|
||||
{
|
||||
Constants.System.DefaultLabelDataTypeId
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Get all integer identifiers for the non-deletable system listviews.
|
||||
/// </summary>
|
||||
private static IEnumerable<int> GetNonDeletableSystemListViewDataTypeIds()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
Constants.System.DefaultContentListViewDataTypeId,
|
||||
Constants.System.DefaultMediaListViewDataTypeId,
|
||||
Constants.System.DefaultMembersListViewDataTypeId
|
||||
};
|
||||
}
|
||||
|
||||
protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
|
||||
{
|
||||
var menu = new MenuItemCollection();
|
||||
|
||||
if (id == Constants.System.Root.ToInvariantString())
|
||||
{
|
||||
//set the default to create
|
||||
menu.DefaultMenuAlias = ActionNew.Instance.Alias;
|
||||
|
||||
// root actions
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize($"actions/{ActionNew.Instance.Alias}"));
|
||||
menu.Items.Add<RefreshNode, ActionRefresh>(Services.TextService.Localize($"actions/{ActionRefresh.Instance.Alias}"), hasSeparator: true);
|
||||
return menu;
|
||||
}
|
||||
|
||||
var container = Services.EntityService.Get(int.Parse(id), UmbracoObjectTypes.DataTypeContainer);
|
||||
if (container != null)
|
||||
{
|
||||
//set the default to create
|
||||
menu.DefaultMenuAlias = ActionNew.Instance.Alias;
|
||||
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize($"actions/{ActionNew.Instance.Alias}"));
|
||||
|
||||
menu.Items.Add(new MenuItem("rename", Services.TextService.Localize("actions/rename"))
|
||||
{
|
||||
Icon = "icon icon-edit"
|
||||
});
|
||||
|
||||
if (container.HasChildren() == false)
|
||||
//can delete data type
|
||||
menu.Items.Add<ActionDelete>(Services.TextService.Localize($"actions/{ActionDelete.Instance.Alias}"));
|
||||
|
||||
return systemIds.Concat(GetNonDeletableSystemListViewDataTypeIds());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all integer identifiers for the non-deletable system listviews.
|
||||
/// </summary>
|
||||
private static IEnumerable<int> GetNonDeletableSystemListViewDataTypeIds()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
Constants.System.DefaultContentListViewDataTypeId,
|
||||
Constants.System.DefaultMediaListViewDataTypeId,
|
||||
Constants.System.DefaultMembersListViewDataTypeId
|
||||
};
|
||||
}
|
||||
|
||||
protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
|
||||
{
|
||||
var menu = new MenuItemCollection();
|
||||
|
||||
if (id == Constants.System.Root.ToInvariantString())
|
||||
{
|
||||
//set the default to create
|
||||
menu.DefaultMenuAlias = ActionNew.Instance.Alias;
|
||||
|
||||
// root actions
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize($"actions/{ActionNew.Instance.Alias}"));
|
||||
menu.Items.Add<RefreshNode, ActionRefresh>(Services.TextService.Localize($"actions/{ActionRefresh.Instance.Alias}"), hasSeparator: true);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var nonDeletableSystemDataTypeIds = GetNonDeletableSystemDataTypeIds();
|
||||
|
||||
if (nonDeletableSystemDataTypeIds.Contains(int.Parse(id)) == false)
|
||||
menu.Items.Add<ActionDelete>(Services.TextService.Localize($"actions/{ActionDelete.Instance.Alias}"));
|
||||
|
||||
menu.Items.Add<ActionMove>(Services.TextService.Localize($"actions/{ActionMove.Instance.Alias}"), hasSeparator: true);
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
public IEnumerable<SearchResultItem> Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null)
|
||||
{
|
||||
var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.DataType, pageIndex, pageSize, out totalFound, filter: query);
|
||||
return Mapper.Map<IEnumerable<SearchResultItem>>(results);
|
||||
}
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
var container = Services.EntityService.Get(int.Parse(id), UmbracoObjectTypes.DataTypeContainer);
|
||||
if (container != null)
|
||||
{
|
||||
//set the default to create
|
||||
menu.DefaultMenuAlias = ActionNew.Instance.Alias;
|
||||
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize($"actions/{ActionNew.Instance.Alias}"));
|
||||
|
||||
menu.Items.Add(new MenuItem("rename", Services.TextService.Localize("actions/rename"))
|
||||
{
|
||||
Icon = "icon icon-edit"
|
||||
});
|
||||
|
||||
if (container.HasChildren() == false)
|
||||
//can delete data type
|
||||
menu.Items.Add<ActionDelete>(Services.TextService.Localize($"actions/{ActionDelete.Instance.Alias}"));
|
||||
|
||||
menu.Items.Add<RefreshNode, ActionRefresh>(Services.TextService.Localize($"actions/{ActionRefresh.Instance.Alias}"), hasSeparator: true);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var nonDeletableSystemDataTypeIds = GetNonDeletableSystemDataTypeIds();
|
||||
|
||||
if (nonDeletableSystemDataTypeIds.Contains(int.Parse(id)) == false)
|
||||
menu.Items.Add<ActionDelete>(Services.TextService.Localize($"actions/{ActionDelete.Instance.Alias}"));
|
||||
|
||||
menu.Items.Add<ActionMove>(Services.TextService.Localize($"actions/{ActionMove.Instance.Alias}"), hasSeparator: true);
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
public IEnumerable<SearchResultItem> Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null)
|
||||
{
|
||||
var results = Services.EntityService.GetPagedDescendantsFromRoot(UmbracoObjectTypes.DataType, pageIndex, pageSize, out totalFound, filter: query);
|
||||
return Mapper.Map<IEnumerable<SearchResultItem>>(results);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Umbraco.Web.Trees
|
||||
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias)));
|
||||
|
||||
menu.Items.Add(new MenuItem("rename", Services.TextService.Localize(String.Format("actions/{0}", "rename")))
|
||||
menu.Items.Add(new MenuItem("rename", Services.TextService.Localize(String.Format("actions/rename")))
|
||||
{
|
||||
Icon = "icon icon-edit"
|
||||
});
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -306,6 +306,9 @@ namespace umbraco
|
||||
// note that some threads could read from it while we hold the lock, though
|
||||
using (var safeXml = GetSafeXmlWriter())
|
||||
{
|
||||
if (safeXml.IsWriter == false)
|
||||
safeXml.UpgradeToWriter();
|
||||
|
||||
safeXml.Xml = PublishNodeDo(d, safeXml.Xml, true);
|
||||
safeXml.AcceptChanges();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace umbraco.cms.helpers
|
||||
return false;
|
||||
}
|
||||
|
||||
if (url.StartsWith("'"))
|
||||
return false;
|
||||
|
||||
if (url.StartsWith("//"))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
Reference in New Issue
Block a user