using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Runtime.Serialization; namespace Umbraco.Web.Models.ContentEditing { /// /// Represents a user that is being edited /// [DataContract(Name = "user", Namespace = "")] [ReadOnly(true)] public class UserDisplay : UserBasic { public UserDisplay() { AvailableCultures = new Dictionary(); StartContentIds = new List(); StartMediaIds = new List(); } /// /// Gets the available cultures (i.e. to populate a drop down) /// The key is the culture stored in the database, the value is the Name /// [DataMember(Name = "availableCultures")] public IDictionary AvailableCultures { get; set; } [DataMember(Name = "startContentIds")] public IEnumerable StartContentIds { get; set; } [DataMember(Name = "startMediaIds")] public IEnumerable StartMediaIds { get; set; } /// /// If the password is reset on save, this value will be populated /// [DataMember(Name = "resetPasswordValue")] [ReadOnly(true)] public string ResetPasswordValue { get; set; } /// /// A readonly value showing the user's current calculated start content ids /// [DataMember(Name = "calculatedStartContentIds")] [ReadOnly(true)] public IEnumerable CalculatedStartContentIds { get; set; } /// /// A readonly value showing the user's current calculated start media ids /// [DataMember(Name = "calculatedStartMediaIds")] [ReadOnly(true)] public IEnumerable CalculatedStartMediaIds { get; set; } [DataMember(Name = "failedPasswordAttempts")] [ReadOnly(true)] public int FailedPasswordAttempts { get; set; } [DataMember(Name = "lastLockoutDate")] [ReadOnly(true)] public DateTime LastLockoutDate { get; set; } [DataMember(Name = "lastPasswordChangeDate")] [ReadOnly(true)] public DateTime LastPasswordChangeDate { get; set; } [DataMember(Name = "createDate")] [ReadOnly(true)] public DateTime CreateDate { get; set; } [DataMember(Name = "updateDate")] [ReadOnly(true)] public DateTime UpdateDate { get; set; } } }