Gets inherited permissions working, adds lots of unit tests, few more tests to write now.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user