more testing, got the protect page dialog all working now and ensuring the data is going to the right places

This commit is contained in:
Shannon
2015-01-28 18:24:12 +11:00
parent 0a0e34d806
commit 6a4966136d
9 changed files with 34 additions and 37 deletions

View File

@@ -59,7 +59,7 @@ namespace Umbraco.Core.Models.EntityBase
/// <remarks>The key is currectly used to store the Unique Id from the
/// umbracoNode table, which many of the entities are based on.</remarks>
[DataMember]
public virtual Guid Key
public Guid Key
{
get
{

View File

@@ -32,6 +32,7 @@ namespace Umbraco.Core.Models
public PublicAccessEntry(Guid id, int protectedNodeId, int loginNodeId, int noAccessNodeId, IEnumerable<PublicAccessRule> ruleCollection)
{
Key = id;
Id = Key.GetHashCode();
LoginNodeId = loginNodeId;
NoAccessNodeId = noAccessNodeId;
@@ -119,18 +120,6 @@ namespace Umbraco.Core.Models
base.AddingEntity();
}
[DataMember]
public sealed override Guid Key
{
get { return base.Key; }
set
{
base.Key = value;
Id = value.GetHashCode();
}
}
[DataMember]
public int LoginNodeId
{

View File

@@ -16,6 +16,7 @@ namespace Umbraco.Core.Models
{
AccessEntryId = accessEntryId;
Key = id;
Id = Key.GetHashCode();
}
public PublicAccessRule()
@@ -24,17 +25,7 @@ namespace Umbraco.Core.Models
private static readonly PropertyInfo RuleValueSelector = ExpressionHelper.GetPropertyInfo<PublicAccessRule, string>(x => x.RuleValue);
private static readonly PropertyInfo RuleTypeSelector = ExpressionHelper.GetPropertyInfo<PublicAccessRule, string>(x => x.RuleType);
public sealed override Guid Key
{
get { return base.Key; }
set
{
base.Key = value;
Id = value.GetHashCode();
}
}
public Guid AccessEntryId { get; internal set; }
/// <summary>
@@ -43,7 +34,7 @@ namespace Umbraco.Core.Models
internal override void AddingEntity()
{
if (Key == default(Guid))
{
{
Key = Guid.NewGuid();
}
base.AddingEntity();