Gets inherited permissions working, adds lots of unit tests, few more tests to write now.

This commit is contained in:
Shannon
2017-07-13 00:07:51 +10:00
parent 7115d85440
commit 044120ffd2
26 changed files with 725 additions and 501 deletions

View File

@@ -41,6 +41,22 @@ namespace Umbraco.Core
ToCSharpEscapeChars[escape[0]] = escape[1];
}
/// <summary>
/// Convert a path to node ids in the order from right to left (deepest to shallowest)
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
internal static int[] GetIdsFromPathReversed(this string path)
{
var nodeIds = path.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => x.TryConvertTo<int>())
.Where(x => x.Success)
.Select(x => x.Result)
.Reverse()
.ToArray();
return nodeIds;
}
/// <summary>
/// Removes new lines and tabs
/// </summary>