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 = "")] public class UserDisplay : EntityBasic, INotificationModel { public UserDisplay() { Notifications = new List(); } [DataMember(Name = "culture", IsRequired = true)] public string Culture { get; set; } [DataMember(Name = "email", IsRequired = true)] public string Email { get; set; } /// /// The list of group aliases assigned to the user /// [DataMember(Name = "userGroups")] public IEnumerable UserGroups { get; set; } /// /// Gets the available user groups (i.e. to populate a drop down) /// The key is the Alias the value is the Name - the Alias is what is used in the UserGroup property and for persistence /// [DataMember(Name = "availableUserGroups")] [ReadOnly(true)] public IDictionary AvailableUserGroups { get; set; } /// /// 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")] [ReadOnly(true)] public IDictionary AvailableCultures { get; set; } [DataMember(Name = "startContentId")] public int StartContentId { get; set; } [DataMember(Name = "startMediaId")] public int StartMediaId { get; set; } /// /// A list of sections the user is allowed to view. /// [DataMember(Name = "allowedSections")] public IEnumerable AllowedSections { get; set; } /// /// Gets the available sections (i.e. to populate a drop down) /// The key is the Alias the value is the Name - the Alias is what is used in the AllowedSections property and for persistence /// [DataMember(Name = "availableSections")] [ReadOnly(true)] public IDictionary AvailableSections { get; set; } /// /// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes. /// [DataMember(Name = "notifications")] public List Notifications { get; private set; } } }