UserPolicy.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. using MediaBrowser.Model.Configuration;
  2. namespace MediaBrowser.Model.Users
  3. {
  4. public class UserPolicy
  5. {
  6. /// <summary>
  7. /// Gets or sets a value indicating whether this instance is administrator.
  8. /// </summary>
  9. /// <value><c>true</c> if this instance is administrator; otherwise, <c>false</c>.</value>
  10. public bool IsAdministrator { get; set; }
  11. /// <summary>
  12. /// Gets or sets a value indicating whether this instance is hidden.
  13. /// </summary>
  14. /// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
  15. public bool IsHidden { get; set; }
  16. /// <summary>
  17. /// Gets or sets a value indicating whether this instance is disabled.
  18. /// </summary>
  19. /// <value><c>true</c> if this instance is disabled; otherwise, <c>false</c>.</value>
  20. public bool IsDisabled { get; set; }
  21. /// <summary>
  22. /// Gets or sets the max parental rating.
  23. /// </summary>
  24. /// <value>The max parental rating.</value>
  25. public int? MaxParentalRating { get; set; }
  26. public string[] BlockedTags { get; set; }
  27. public bool EnableUserPreferenceAccess { get; set; }
  28. public AccessSchedule[] AccessSchedules { get; set; }
  29. public UnratedItem[] BlockUnratedItems { get; set; }
  30. public bool EnableRemoteControlOfOtherUsers { get; set; }
  31. public bool EnableSharedDeviceControl { get; set; }
  32. public bool EnableLiveTvManagement { get; set; }
  33. public bool EnableLiveTvAccess { get; set; }
  34. public bool EnableMediaPlayback { get; set; }
  35. public bool EnableAudioPlaybackTranscoding { get; set; }
  36. public bool EnableVideoPlaybackTranscoding { get; set; }
  37. public bool EnablePlaybackRemuxing { get; set; }
  38. public bool EnableContentDeletion { get; set; }
  39. public string[] EnableContentDeletionFromFolders { get; set; }
  40. public bool EnableContentDownloading { get; set; }
  41. /// <summary>
  42. /// Gets or sets a value indicating whether [enable synchronize].
  43. /// </summary>
  44. /// <value><c>true</c> if [enable synchronize]; otherwise, <c>false</c>.</value>
  45. public bool EnableSyncTranscoding { get; set; }
  46. public string[] EnabledDevices { get; set; }
  47. public bool EnableAllDevices { get; set; }
  48. public string[] EnabledChannels { get; set; }
  49. public bool EnableAllChannels { get; set; }
  50. public string[] EnabledFolders { get; set; }
  51. public bool EnableAllFolders { get; set; }
  52. public int InvalidLoginAttemptCount { get; set; }
  53. public bool EnablePublicSharing { get; set; }
  54. public string[] BlockedMediaFolders { get; set; }
  55. public string[] BlockedChannels { get; set; }
  56. public int RemoteClientBitrateLimit { get; set; }
  57. public UserPolicy()
  58. {
  59. EnableContentDeletion = true;
  60. EnableContentDeletionFromFolders = new string[] { };
  61. EnableSyncTranscoding = true;
  62. EnableMediaPlayback = true;
  63. EnableAudioPlaybackTranscoding = true;
  64. EnableVideoPlaybackTranscoding = true;
  65. EnablePlaybackRemuxing = true;
  66. EnableLiveTvManagement = true;
  67. EnableLiveTvAccess = true;
  68. // Without this on by default, admins won't be able to do this
  69. // Improve in the future
  70. EnableLiveTvManagement = true;
  71. EnableSharedDeviceControl = true;
  72. BlockedTags = new string[] { };
  73. BlockUnratedItems = new UnratedItem[] { };
  74. EnableUserPreferenceAccess = true;
  75. AccessSchedules = new AccessSchedule[] { };
  76. EnableAllChannels = true;
  77. EnabledChannels = new string[] { };
  78. EnableAllFolders = true;
  79. EnabledFolders = new string[] { };
  80. EnabledDevices = new string[] { };
  81. EnableAllDevices = true;
  82. EnableContentDownloading = true;
  83. EnablePublicSharing = true;
  84. }
  85. }
  86. }