Temp fix for: U4-3968 Umbraco 7.01 - Membership - Public Access - Add Single User protection - crash, fixes protectPage so that it uses the membership provider to make changes, updates the UI logic so that if you choose an existing user it will you about it, fixes it so you cannot arbitrarily change a member's password.
This commit is contained in:
@@ -15,6 +15,7 @@ namespace Umbraco.Core.Models
|
||||
{
|
||||
//Dictionary is divided into string: PropertyTypeAlias, Tuple: MemberCanEdit, VisibleOnProfile, PropertyTypeId
|
||||
private IDictionary<string, Tuple<bool, bool, int>> _memberTypePropertyTypes;
|
||||
private string _alias;
|
||||
|
||||
public MemberType(int parentId) : base(parentId)
|
||||
{
|
||||
@@ -27,6 +28,29 @@ namespace Umbraco.Core.Models
|
||||
}
|
||||
|
||||
private static readonly PropertyInfo MemberTypePropertyTypesSelector = ExpressionHelper.GetPropertyInfo<MemberType, IDictionary<string, Tuple<bool, bool, int>>>(x => x.MemberTypePropertyTypes);
|
||||
private static readonly PropertyInfo AliasSelector = ExpressionHelper.GetPropertyInfo<MemberType, string>(x => x.Alias);
|
||||
|
||||
/// <summary>
|
||||
/// The Alias of the ContentType
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public override string Alias
|
||||
{
|
||||
get { return _alias; }
|
||||
set
|
||||
{
|
||||
//NOTE: WE are overriding this because we don't want to do a ToSafeAlias when the alias is the special case of
|
||||
// "_umbracoSystemDefaultProtectType" which is used internally, currently there is an issue with the safe alias as it strips
|
||||
// leading underscores which we don't want in this case.
|
||||
// see : http://issues.umbraco.org/issue/U4-3968
|
||||
|
||||
SetPropertyValueAndDetectChanges(o =>
|
||||
{
|
||||
_alias = value == "_umbracoSystemDefaultProtectType" ? value : value.ToSafeAlias();
|
||||
return _alias;
|
||||
}, _alias, AliasSelector);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets a Dictionary of Tuples (MemberCanEdit, VisibleOnProfile, PropertyTypeId) by the PropertyTypes' alias.
|
||||
|
||||
@@ -20,5 +20,10 @@ namespace Umbraco.Core.Security
|
||||
return (membershipProvider is UmbracoMembershipProviderBase);
|
||||
}
|
||||
|
||||
public static UmbracoMembershipProviderBase AsUmbracoMembershipProvider(this MembershipProvider membershipProvider)
|
||||
{
|
||||
return (UmbracoMembershipProviderBase)membershipProvider;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user