Add supportsReadOnlyMode to ContentPropertyDisplay.cs
This commit is contained in:
@@ -252,7 +252,7 @@ public class ContentVariantMapper
|
||||
// If user does not have access, return only browse permission
|
||||
if (!hasAccess)
|
||||
{
|
||||
return new[] {ActionBrowse.ActionLetter.ToString()};
|
||||
return new[] { ActionBrowse.ActionLetter.ToString() };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,8 @@ public class MemberTabsAndPropertiesMapper : TabsAndPropertiesMapper<IMember>
|
||||
prop.IsSensitive = true;
|
||||
// mark this property as readonly so that it does not post any data
|
||||
prop.Readonly = true;
|
||||
// this is readonly so support read-only mode
|
||||
prop.SupportsReadOnly = true;
|
||||
// replace this editor with a sensitive value
|
||||
prop.View = "sensitivevalue";
|
||||
// clear the value
|
||||
@@ -233,6 +235,7 @@ public class MemberTabsAndPropertiesMapper : TabsAndPropertiesMapper<IMember>
|
||||
View = "boolean",
|
||||
IsSensitive = true,
|
||||
Readonly = false,
|
||||
SupportsReadOnly = true,
|
||||
},
|
||||
|
||||
new()
|
||||
@@ -243,6 +246,7 @@ public class MemberTabsAndPropertiesMapper : TabsAndPropertiesMapper<IMember>
|
||||
View = "boolean",
|
||||
IsSensitive = true,
|
||||
Readonly = !member.IsLockedOut, // IMember.IsLockedOut can't be set to true, so make it readonly when that's the case (you can only unlock)
|
||||
SupportsReadOnly = true,
|
||||
},
|
||||
|
||||
new()
|
||||
@@ -283,6 +287,7 @@ public class MemberTabsAndPropertiesMapper : TabsAndPropertiesMapper<IMember>
|
||||
property.Value = null;
|
||||
property.View = "sensitivevalue";
|
||||
property.Readonly = true;
|
||||
property.SupportsReadOnly = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user