Enable TreatWarningsAsErrors for MediaBrowser.Model

This commit is contained in:
Bond_009
2021-02-20 23:13:04 +01:00
parent 13d65318eb
commit 141efafd3d
98 changed files with 1800 additions and 1784 deletions

View File

@@ -10,6 +10,56 @@ namespace MediaBrowser.Model.Users
{
public class UserPolicy
{
public UserPolicy()
{
IsHidden = true;
EnableContentDeletion = false;
EnableContentDeletionFromFolders = Array.Empty<string>();
EnableSyncTranscoding = true;
EnableMediaConversion = true;
EnableMediaPlayback = true;
EnableAudioPlaybackTranscoding = true;
EnableVideoPlaybackTranscoding = true;
EnablePlaybackRemuxing = true;
ForceRemoteSourceTranscoding = false;
EnableLiveTvManagement = true;
EnableLiveTvAccess = true;
// Without this on by default, admins won't be able to do this
// Improve in the future
EnableLiveTvManagement = true;
EnableSharedDeviceControl = true;
BlockedTags = Array.Empty<string>();
BlockUnratedItems = Array.Empty<UnratedItem>();
EnableUserPreferenceAccess = true;
AccessSchedules = Array.Empty<AccessSchedule>();
LoginAttemptsBeforeLockout = -1;
MaxActiveSessions = 0;
EnableAllChannels = true;
EnabledChannels = Array.Empty<Guid>();
EnableAllFolders = true;
EnabledFolders = Array.Empty<Guid>();
EnabledDevices = Array.Empty<string>();
EnableAllDevices = true;
EnableContentDownloading = true;
EnablePublicSharing = true;
EnableRemoteAccess = true;
SyncPlayAccess = SyncPlayUserAccessType.CreateAndJoinGroups;
}
/// <summary>
/// Gets or sets a value indicating whether this instance is administrator.
/// </summary>
@@ -112,55 +162,5 @@ namespace MediaBrowser.Model.Users
/// </summary>
/// <value>Access level to SyncPlay features.</value>
public SyncPlayUserAccessType SyncPlayAccess { get; set; }
public UserPolicy()
{
IsHidden = true;
EnableContentDeletion = false;
EnableContentDeletionFromFolders = Array.Empty<string>();
EnableSyncTranscoding = true;
EnableMediaConversion = true;
EnableMediaPlayback = true;
EnableAudioPlaybackTranscoding = true;
EnableVideoPlaybackTranscoding = true;
EnablePlaybackRemuxing = true;
ForceRemoteSourceTranscoding = false;
EnableLiveTvManagement = true;
EnableLiveTvAccess = true;
// Without this on by default, admins won't be able to do this
// Improve in the future
EnableLiveTvManagement = true;
EnableSharedDeviceControl = true;
BlockedTags = Array.Empty<string>();
BlockUnratedItems = Array.Empty<UnratedItem>();
EnableUserPreferenceAccess = true;
AccessSchedules = Array.Empty<AccessSchedule>();
LoginAttemptsBeforeLockout = -1;
MaxActiveSessions = 0;
EnableAllChannels = true;
EnabledChannels = Array.Empty<Guid>();
EnableAllFolders = true;
EnabledFolders = Array.Empty<Guid>();
EnabledDevices = Array.Empty<string>();
EnableAllDevices = true;
EnableContentDownloading = true;
EnablePublicSharing = true;
EnableRemoteAccess = true;
SyncPlayAccess = SyncPlayUserAccessType.CreateAndJoinGroups;
}
}
}