Skip to content

Commit

Permalink
Fixing user permissions upgrade failing when there are permissions co…
Browse files Browse the repository at this point in the history
…nnected to no longer existing users/user groups.
  • Loading branch information
napernik committed Oct 30, 2017
1 parent e332459 commit 6f26ee6
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -19,6 +19,7 @@ namespace Composite.C1Console.Security.Compatibility
[ApplicationStartup(AbortStartupOnException = false)]
public static class LegacySerializedEntityTokenUpgrader
{
const string LogTitle = nameof(LegacySerializedEntityTokenUpgrader);
const string _configFilename = "LegacySerializedEntityTokenUpgrader.config";
static readonly XName _docRoot = "UpgradeSettings";
private static ILog _log;
Expand All @@ -38,7 +39,7 @@ public static void OnInitialized(ILog log)
}
catch (Exception ex)
{
_log.LogError(nameof(LegacySerializedEntityTokenUpgrader), ex);
_log.LogError(LogTitle, ex);

throw;
}
Expand Down Expand Up @@ -156,7 +157,7 @@ private static void UpgradeStoredData()
}
catch (Exception ex)
{
_log.LogError(nameof(LegacySerializedEntityTokenUpgrader), "Failed to upgrade old token {0} from data type {1} as EntityToken.\n{2}", token, dataType.FullName, ex);
_log.LogError(LogTitle, $"Failed to upgrade old token '{token}' from data type '{dataType.FullName}' as EntityToken.\n{ex}");
}
}

Expand All @@ -176,11 +177,11 @@ private static void UpgradeStoredData()
}
catch (Exception ex)
{
_log.LogError(nameof(LegacySerializedEntityTokenUpgrader), "Failed to upgrade old token {0} from data type {1} as DataSourceId.\n{2}", token, dataType.FullName, ex);
_log.LogError(LogTitle, $"Failed to upgrade old token '{token}' from data type '{dataType.FullName}' as DataSourceId.\n{ex}");
}
}

if (rowChange) DataFacade.Update(rowItem);
if (rowChange) DataFacade.Update(rowItem, true, false, false);
}
}
}
Expand Down

0 comments on commit 6f26ee6

Please sign in to comment.