Move UmbracoConfig singleton to Current
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
@@ -66,7 +67,7 @@ namespace Umbraco.Core.Models.Identity
|
||||
_startContentIds = new int[] { };
|
||||
_groups = new IReadOnlyUserGroup[] { };
|
||||
_allowedSections = new string[] { };
|
||||
_culture = UmbracoConfig.For.GlobalSettings().DefaultUILanguage; //fixme inject somehow?
|
||||
_culture = Current.Config.Global().DefaultUILanguage; //fixme inject somehow?
|
||||
_groups = new IReadOnlyUserGroup[0];
|
||||
_roles = new ObservableCollection<IdentityUserRole<string>>();
|
||||
_roles.CollectionChanged += _roles_CollectionChanged;
|
||||
@@ -83,7 +84,7 @@ namespace Umbraco.Core.Models.Identity
|
||||
_startContentIds = new int[] { };
|
||||
_groups = new IReadOnlyUserGroup[] { };
|
||||
_allowedSections = new string[] { };
|
||||
_culture = UmbracoConfig.For.GlobalSettings().DefaultUILanguage; //fixme inject somehow?
|
||||
_culture = Current.Config.Global().DefaultUILanguage; //fixme inject somehow?
|
||||
_groups = groups.ToArray();
|
||||
_roles = new ObservableCollection<IdentityUserRole<string>>(_groups.Select(x => new IdentityUserRole<string>
|
||||
{
|
||||
@@ -442,6 +443,6 @@ namespace Umbraco.Core.Models.Identity
|
||||
groups => groups.GetHashCode());
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Models.Membership
|
||||
{
|
||||
SessionTimeout = 60;
|
||||
_userGroups = new HashSet<IReadOnlyUserGroup>();
|
||||
_language = UmbracoConfig.For.GlobalSettings().DefaultUILanguage; //fixme inject somehow?
|
||||
_language = Current.Config.Global().DefaultUILanguage; //fixme inject somehow?
|
||||
_isApproved = true;
|
||||
_isLockedOut = false;
|
||||
_startContentIds = new int[] { };
|
||||
@@ -453,7 +453,7 @@ namespace Umbraco.Core.Models.Membership
|
||||
base.PerformDeepClone(clone);
|
||||
|
||||
var clonedEntity = (User)clone;
|
||||
|
||||
|
||||
//manually clone the start node props
|
||||
clonedEntity._startContentIds = _startContentIds.ToArray();
|
||||
clonedEntity._startMediaIds = _startMediaIds.ToArray();
|
||||
@@ -483,7 +483,7 @@ namespace Umbraco.Core.Models.Membership
|
||||
//need to create new collections otherwise they'll get copied by ref
|
||||
clonedEntity._userGroups = new HashSet<IReadOnlyUserGroup>(_userGroups);
|
||||
clonedEntity._allowedSections = _allowedSections != null ? new List<string>(_allowedSections) : null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user