From 57a8df8309575ee1b8a3f0e28714a19a8107f6c0 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Aug 2017 16:47:52 +1000 Subject: [PATCH] fixes tests --- .../Editors/UserEditorAuthorizationHelper.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/Editors/UserEditorAuthorizationHelper.cs b/src/Umbraco.Web/Editors/UserEditorAuthorizationHelper.cs index d4df5b2597..5dcd5572e4 100644 --- a/src/Umbraco.Web/Editors/UserEditorAuthorizationHelper.cs +++ b/src/Umbraco.Web/Editors/UserEditorAuthorizationHelper.cs @@ -52,8 +52,16 @@ namespace Umbraco.Web.Editors //a user can remove any start nodes and add start nodes that they have access to //but they cannot add a start node that they do not have access to - var changedStartContentIds = savingUser == null ? startContentIds : startContentIds.Except(savingUser.StartContentIds).ToArray(); - var changedStartMediaIds = savingUser == null ? startMediaIds : startMediaIds.Except(savingUser.StartMediaIds).ToArray(); + var changedStartContentIds = savingUser == null + ? startContentIds + : startContentIds == null + ? null + : startContentIds.Except(savingUser.StartContentIds).ToArray(); + var changedStartMediaIds = savingUser == null + ? startMediaIds + : startMediaIds == null + ? null + : startMediaIds.Except(savingUser.StartMediaIds).ToArray(); var pathResult = AuthorizePath(currentUser, changedStartContentIds, changedStartMediaIds); if (pathResult == false) return pathResult;