UserPolicy.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 bool EnableContentDownloading { get; set; }
  40. /// <summary>
  41. /// Gets or sets a value indicating whether [enable synchronize].
  42. /// </summary>
  43. /// <value><c>true</c> if [enable synchronize]; otherwise, <c>false</c>.</value>
  44. public bool EnableSyncTranscoding { get; set; }
  45. public string[] EnabledDevices { get; set; }
  46. public bool EnableAllDevices { get; set; }
  47. public string[] EnabledChannels { get; set; }
  48. public bool EnableAllChannels { get; set; }
  49. public string[] EnabledFolders { get; set; }
  50. public bool EnableAllFolders { get; set; }
  51. public int InvalidLoginAttemptCount { get; set; }
  52. public bool EnablePublicSharing { get; set; }
  53. public string[] BlockedMediaFolders { get; set; }
  54. public string[] BlockedChannels { get; set; }
  55. public UserPolicy()
  56. {
  57. EnableSyncTranscoding = true;
  58. EnableMediaPlayback = true;
  59. EnableAudioPlaybackTranscoding = true;
  60. EnableVideoPlaybackTranscoding = true;
  61. EnablePlaybackRemuxing = true;
  62. EnableLiveTvManagement = true;
  63. EnableLiveTvAccess = true;
  64. // Without this on by default, admins won't be able to do this
  65. // Improve in the future
  66. EnableLiveTvManagement = true;
  67. EnableSharedDeviceControl = true;
  68. BlockedTags = new string[] { };
  69. BlockUnratedItems = new UnratedItem[] { };
  70. EnableUserPreferenceAccess = true;
  71. AccessSchedules = new AccessSchedule[] { };
  72. EnableAllChannels = true;
  73. EnabledChannels = new string[] { };
  74. EnableAllFolders = true;
  75. EnabledFolders = new string[] { };
  76. EnabledDevices = new string[] { };
  77. EnableAllDevices = true;
  78. EnableContentDownloading = true;
  79. EnablePublicSharing = true;
  80. }
  81. }
  82. }