< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Users.UserPolicy
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Users/UserPolicy.cs
Line coverage
100%
Covered lines: 35
Uncovered lines: 0
Coverable lines: 35
Total lines: 196
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Users/UserPolicy.cs

#LineLine coverage
 1#nullable disable
 2#pragma warning disable CS1591, CA1819
 3
 4using System;
 5using System.ComponentModel;
 6using System.ComponentModel.DataAnnotations;
 7using System.Xml.Serialization;
 8using Jellyfin.Data.Enums;
 9using AccessSchedule = Jellyfin.Data.Entities.AccessSchedule;
 10
 11namespace MediaBrowser.Model.Users
 12{
 13    public class UserPolicy
 14    {
 15        public UserPolicy()
 16        {
 14917            IsHidden = true;
 14918            EnableCollectionManagement = false;
 14919            EnableSubtitleManagement = false;
 20
 14921            EnableContentDeletion = false;
 14922            EnableContentDeletionFromFolders = Array.Empty<string>();
 23
 14924            EnableSyncTranscoding = true;
 14925            EnableMediaConversion = true;
 26
 14927            EnableMediaPlayback = true;
 14928            EnableAudioPlaybackTranscoding = true;
 14929            EnableVideoPlaybackTranscoding = true;
 14930            EnablePlaybackRemuxing = true;
 14931            ForceRemoteSourceTranscoding = false;
 14932            EnableLiveTvManagement = true;
 14933            EnableLiveTvAccess = true;
 34
 35            // Without this on by default, admins won't be able to do this
 36            // Improve in the future
 14937            EnableLiveTvManagement = true;
 38
 14939            EnableSharedDeviceControl = true;
 40
 14941            BlockedTags = Array.Empty<string>();
 14942            AllowedTags = Array.Empty<string>();
 14943            BlockUnratedItems = Array.Empty<UnratedItem>();
 44
 14945            EnableUserPreferenceAccess = true;
 46
 14947            AccessSchedules = Array.Empty<AccessSchedule>();
 48
 14949            LoginAttemptsBeforeLockout = -1;
 50
 14951            MaxActiveSessions = 0;
 14952            MaxParentalRating = null;
 53
 14954            EnableAllChannels = true;
 14955            EnabledChannels = Array.Empty<Guid>();
 56
 14957            EnableAllFolders = true;
 14958            EnabledFolders = Array.Empty<Guid>();
 59
 14960            EnabledDevices = Array.Empty<string>();
 14961            EnableAllDevices = true;
 62
 14963            EnableContentDownloading = true;
 14964            EnablePublicSharing = true;
 14965            EnableRemoteAccess = true;
 14966            SyncPlayAccess = SyncPlayUserAccessType.CreateAndJoinGroups;
 14967        }
 68
 69        /// <summary>
 70        /// Gets or sets a value indicating whether this instance is administrator.
 71        /// </summary>
 72        /// <value><c>true</c> if this instance is administrator; otherwise, <c>false</c>.</value>
 73        public bool IsAdministrator { get; set; }
 74
 75        /// <summary>
 76        /// Gets or sets a value indicating whether this instance is hidden.
 77        /// </summary>
 78        /// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
 79        public bool IsHidden { get; set; }
 80
 81        /// <summary>
 82        /// Gets or sets a value indicating whether this instance can manage collections.
 83        /// </summary>
 84        /// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
 85        [DefaultValue(false)]
 86        public bool EnableCollectionManagement { get; set; }
 87
 88        /// <summary>
 89        /// Gets or sets a value indicating whether this instance can manage subtitles.
 90        /// </summary>
 91        /// <value><c>true</c> if this instance is allowed; otherwise, <c>false</c>.</value>
 92        [DefaultValue(false)]
 93        public bool EnableSubtitleManagement { get; set; }
 94
 95        /// <summary>
 96        /// Gets or sets a value indicating whether this user can manage lyrics.
 97        /// </summary>
 98        [DefaultValue(false)]
 99        public bool EnableLyricManagement { get; set; }
 100
 101        /// <summary>
 102        /// Gets or sets a value indicating whether this instance is disabled.
 103        /// </summary>
 104        /// <value><c>true</c> if this instance is disabled; otherwise, <c>false</c>.</value>
 105        public bool IsDisabled { get; set; }
 106
 107        /// <summary>
 108        /// Gets or sets the max parental rating.
 109        /// </summary>
 110        /// <value>The max parental rating.</value>
 111        public int? MaxParentalRating { get; set; }
 112
 113        public string[] BlockedTags { get; set; }
 114
 115        public string[] AllowedTags { get; set; }
 116
 117        public bool EnableUserPreferenceAccess { get; set; }
 118
 119        public AccessSchedule[] AccessSchedules { get; set; }
 120
 121        public UnratedItem[] BlockUnratedItems { get; set; }
 122
 123        public bool EnableRemoteControlOfOtherUsers { get; set; }
 124
 125        public bool EnableSharedDeviceControl { get; set; }
 126
 127        public bool EnableRemoteAccess { get; set; }
 128
 129        public bool EnableLiveTvManagement { get; set; }
 130
 131        public bool EnableLiveTvAccess { get; set; }
 132
 133        public bool EnableMediaPlayback { get; set; }
 134
 135        public bool EnableAudioPlaybackTranscoding { get; set; }
 136
 137        public bool EnableVideoPlaybackTranscoding { get; set; }
 138
 139        public bool EnablePlaybackRemuxing { get; set; }
 140
 141        public bool ForceRemoteSourceTranscoding { get; set; }
 142
 143        public bool EnableContentDeletion { get; set; }
 144
 145        public string[] EnableContentDeletionFromFolders { get; set; }
 146
 147        public bool EnableContentDownloading { get; set; }
 148
 149        /// <summary>
 150        /// Gets or sets a value indicating whether [enable synchronize].
 151        /// </summary>
 152        /// <value><c>true</c> if [enable synchronize]; otherwise, <c>false</c>.</value>
 153        public bool EnableSyncTranscoding { get; set; }
 154
 155        public bool EnableMediaConversion { get; set; }
 156
 157        public string[] EnabledDevices { get; set; }
 158
 159        public bool EnableAllDevices { get; set; }
 160
 161        public Guid[] EnabledChannels { get; set; }
 162
 163        public bool EnableAllChannels { get; set; }
 164
 165        public Guid[] EnabledFolders { get; set; }
 166
 167        public bool EnableAllFolders { get; set; }
 168
 169        public int InvalidLoginAttemptCount { get; set; }
 170
 171        public int LoginAttemptsBeforeLockout { get; set; }
 172
 173        public int MaxActiveSessions { get; set; }
 174
 175        public bool EnablePublicSharing { get; set; }
 176
 177        public Guid[] BlockedMediaFolders { get; set; }
 178
 179        public Guid[] BlockedChannels { get; set; }
 180
 181        public int RemoteClientBitrateLimit { get; set; }
 182
 183        [XmlElement(ElementName = "AuthenticationProviderId")]
 184        [Required(AllowEmptyStrings = false)]
 185        public string AuthenticationProviderId { get; set; }
 186
 187        [Required(AllowEmptyStrings= false)]
 188        public string PasswordResetProviderId { get; set; }
 189
 190        /// <summary>
 191        /// Gets or sets a value indicating what SyncPlay features the user can access.
 192        /// </summary>
 193        /// <value>Access level to SyncPlay features.</value>
 194        public SyncPlayUserAccessType SyncPlayAccess { get; set; }
 195    }
 196}

Methods/Properties

.ctor()