diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index 8e9195d..9431da0 100644 --- a/AssemblyVersion.cs +++ b/AssemblyVersion.cs @@ -16,5 +16,5 @@ using System.Reflection; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.1.455")] -[assembly: AssemblyFileVersion("3.0.1.455")] +[assembly: AssemblyVersion("3.0.1.456")] +[assembly: AssemblyFileVersion("3.0.1.456")] diff --git a/Core/SessionFacade.cs b/Core/SessionFacade.cs index a5a86e6..0a3e94e 100644 --- a/Core/SessionFacade.cs +++ b/Core/SessionFacade.cs @@ -94,10 +94,13 @@ namespace ScrewTurn.Wiki { if(groups == null || groups.Length == 0) { UserInfo current = GetCurrentUser(); if(current != null) { - groups = new UserGroup[current.Groups.Length]; - for(int i = 0; i < groups.Length; i++) { - groups[i] = Users.FindUserGroup(current.Groups[i]); + // This check is necessary because after group deletion the session might contain outdated data + List temp = new List(current.Groups.Length); + for(int i = 0; i < current.Groups.Length; i++) { + UserGroup tempGroup = Users.FindUserGroup(current.Groups[i]); + if(tempGroup != null) temp.Add(tempGroup); } + groups = temp.ToArray(); } else { groups = new UserGroup[] { Users.FindUserGroup(Settings.AnonymousGroup) }; diff --git a/Core/UsersStorageProvider.cs b/Core/UsersStorageProvider.cs index 0521411..3dac62b 100644 --- a/Core/UsersStorageProvider.cs +++ b/Core/UsersStorageProvider.cs @@ -643,6 +643,7 @@ namespace ScrewTurn.Wiki { DumpUserGroups(result.ToArray()); groupsCache = null; + usersCache = null; return result.Count == allGroups.Length - 1; }