using System; using System.Collections.Generic; using Umbraco.Core.Models; namespace Umbraco.Core { public static partial class Constants { /// /// Defines the identifiers for property-type alias conventions that are used within the Umbraco core. /// public static class Conventions { internal static class PermissionCategories { public const string ContentCategory = "content"; public const string AdministrationCategory = "administration"; public const string StructureCategory = "structure"; public const string OtherCategory = "other"; } public static class PublicAccess { public const string MemberUsernameRuleType = "MemberUsername"; public const string MemberRoleRuleType = "MemberRole"; [Obsolete("No longer supported, this is here for backwards compatibility only")] public const string MemberIdRuleType = "MemberId"; } public static class DataTypes { public const string ListViewPrefix = "List View - "; } /// /// Constants for Umbraco Content property aliases. /// public static class Content { /// /// Property alias for the Content's Url (internal) redirect. /// public const string InternalRedirectId = "umbracoInternalRedirectId"; /// /// Property alias for the Content's navigational hide, (not actually used in core code). /// public const string NaviHide = "umbracoNaviHide"; /// /// Property alias for the Content's Url redirect. /// public const string Redirect = "umbracoRedirect"; /// /// Property alias for the Content's Url alias. /// public const string UrlAlias = "umbracoUrlAlias"; /// /// Property alias for the Content's Url name. /// public const string UrlName = "umbracoUrlName"; } /// /// Constants for Umbraco Media property aliases. /// public static class Media { /// /// Property alias for the Media's file name. /// public const string File = "umbracoFile"; /// /// Property alias for the Media's width. /// public const string Width = "umbracoWidth"; /// /// Property alias for the Media's height. /// public const string Height = "umbracoHeight"; /// /// Property alias for the Media's file size (in bytes). /// public const string Bytes = "umbracoBytes"; /// /// Property alias for the Media's file extension. /// public const string Extension = "umbracoExtension"; } /// /// Defines the alias identifiers for Umbraco media types. /// public static class MediaTypes { /// /// MediaType alias for a file. /// public const string File = "File"; /// /// MediaType alias for a folder. /// public const string Folder = "Folder"; /// /// MediaType alias for an image. /// public const string Image = "Image"; /// /// MediaType alias indicating allowing auto-selection. /// public const string AutoSelect = "umbracoAutoSelect"; } /// /// Constants for Umbraco Member property aliases. /// public static class Member { /// /// if a role starts with __umbracoRole we won't show it as it's an internal role used for public access /// public static readonly string InternalRolePrefix = "__umbracoRole"; public static readonly string UmbracoMemberProviderName = "UmbracoMembershipProvider"; public static readonly string UmbracoRoleProviderName = "UmbracoRoleProvider"; /// /// Property alias for a Members Password Question /// public const string PasswordQuestion = "umbracoMemberPasswordRetrievalQuestion"; public const string PasswordQuestionLabel = "Password Question"; /// /// Property alias for Members Password Answer /// public const string PasswordAnswer = "umbracoMemberPasswordRetrievalAnswer"; public const string PasswordAnswerLabel = "Password Answer"; /// /// Property alias for the Comments on a Member /// public const string Comments = "umbracoMemberComments"; public const string CommentsLabel = "Comments"; /// /// Property alias for the Approved boolean of a Member /// public const string IsApproved = "umbracoMemberApproved"; public const string IsApprovedLabel = "Is Approved"; /// /// Property alias for the Locked out boolean of a Member /// public const string IsLockedOut = "umbracoMemberLockedOut"; public const string IsLockedOutLabel = "Is Locked Out"; /// /// Property alias for the last date the Member logged in /// public const string LastLoginDate = "umbracoMemberLastLogin"; public const string LastLoginDateLabel = "Last Login Date"; /// /// Property alias for the last date a Member changed its password /// public const string LastPasswordChangeDate = "umbracoMemberLastPasswordChangeDate"; public const string LastPasswordChangeDateLabel = "Last Password Change Date"; /// /// Property alias for the last date a Member was locked out /// public const string LastLockoutDate = "umbracoMemberLastLockoutDate"; public const string LastLockoutDateLabel = "Last Lockout Date"; /// /// Property alias for the number of failed login attemps /// public const string FailedPasswordAttempts = "umbracoMemberFailedPasswordAttempts"; public const string FailedPasswordAttemptsLabel = "Failed Password Attempts"; /// /// Group name to put the membership properties on /// internal const string StandardPropertiesGroupName = "Membership"; public static Dictionary GetStandardPropertyTypeStubs() { return new Dictionary { { Comments, new PropertyType(PropertyEditors.Aliases.TextArea, ValueStorageType.Ntext, true, Comments) { Name = CommentsLabel } }, { FailedPasswordAttempts, new PropertyType(PropertyEditors.Aliases.NoEdit, ValueStorageType.Integer, true, FailedPasswordAttempts) { Name = FailedPasswordAttemptsLabel } }, { IsApproved, new PropertyType(PropertyEditors.Aliases.Boolean, ValueStorageType.Integer, true, IsApproved) { Name = IsApprovedLabel } }, { IsLockedOut, new PropertyType(PropertyEditors.Aliases.Boolean, ValueStorageType.Integer, true, IsLockedOut) { Name = IsLockedOutLabel } }, { LastLockoutDate, new PropertyType(PropertyEditors.Aliases.NoEdit, ValueStorageType.Date, true, LastLockoutDate) { Name = LastLockoutDateLabel } }, { LastLoginDate, new PropertyType(PropertyEditors.Aliases.NoEdit, ValueStorageType.Date, true, LastLoginDate) { Name = LastLoginDateLabel } }, { LastPasswordChangeDate, new PropertyType(PropertyEditors.Aliases.NoEdit, ValueStorageType.Date, true, LastPasswordChangeDate) { Name = LastPasswordChangeDateLabel } }, { PasswordAnswer, new PropertyType(PropertyEditors.Aliases.NoEdit, ValueStorageType.Nvarchar, true, PasswordAnswer) { Name = PasswordAnswerLabel } }, { PasswordQuestion, new PropertyType(PropertyEditors.Aliases.NoEdit, ValueStorageType.Nvarchar, true, PasswordQuestion) { Name = PasswordQuestionLabel } } }; } } /// /// Defines the alias identifiers for Umbraco member types. /// public static class MemberTypes { /// /// MemberType alias for default member type. /// public const string DefaultAlias = "Member"; public const string SystemDefaultProtectType = "_umbracoSystemDefaultProtectType"; public const string AllMembersListId = "all-members"; } /// /// Constants for Umbraco URLs/Querystrings. /// public static class Url { /// /// Querystring parameter name used for Umbraco's alternative template functionality. /// public const string AltTemplate = "altTemplate"; } /// /// Defines the alias identifiers for built-in Umbraco relation types. /// public static class RelationTypes { /// /// ContentType name for default relation type "Relate Document On Copy". /// public const string RelateDocumentOnCopyName = "Relate Document On Copy"; /// /// ContentType alias for default relation type "Relate Document On Copy". /// public const string RelateDocumentOnCopyAlias = "relateDocumentOnCopy"; /// /// ContentType name for default relation type "Relate Parent Document On Delete". /// public const string RelateParentDocumentOnDeleteName = "Relate Parent Document On Delete"; /// /// ContentType alias for default relation type "Relate Parent Document On Delete". /// public const string RelateParentDocumentOnDeleteAlias = "relateParentDocumentOnDelete"; /// /// ContentType name for default relation type "Relate Parent Media Folder On Delete". /// public const string RelateParentMediaFolderOnDeleteName = "Relate Parent Media Folder On Delete"; /// /// ContentType alias for default relation type "Relate Parent Media Folder On Delete". /// public const string RelateParentMediaFolderOnDeleteAlias = "relateParentMediaFolderOnDelete"; } } } }