UserPolicy.cs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 string[] BlockedMediaFolders { get; set; }
  31. public string[] BlockedChannels { get; set; }
  32. public bool EnableRemoteControlOfOtherUsers { get; set; }
  33. public bool EnableSharedDeviceControl { get; set; }
  34. public bool EnableLiveTvManagement { get; set; }
  35. public bool EnableLiveTvAccess { get; set; }
  36. public bool EnableMediaPlayback { get; set; }
  37. public bool EnableContentDeletion { get; set; }
  38. /// <summary>
  39. /// Gets or sets a value indicating whether [enable synchronize].
  40. /// </summary>
  41. /// <value><c>true</c> if [enable synchronize]; otherwise, <c>false</c>.</value>
  42. public bool EnableSync { get; set; }
  43. public string[] EnabledDevices { get; set; }
  44. public bool EnableAllDevices { get; set; }
  45. public string[] EnabledChannels { get; set; }
  46. public bool EnableAllChannels { get; set; }
  47. public string[] EnabledFolders { get; set; }
  48. public bool EnableAllFolders { get; set; }
  49. public UserPolicy()
  50. {
  51. EnableLiveTvManagement = true;
  52. EnableMediaPlayback = true;
  53. EnableLiveTvAccess = true;
  54. EnableSharedDeviceControl = true;
  55. BlockedTags = new string[] { };
  56. BlockUnratedItems = new UnratedItem[] { };
  57. EnableUserPreferenceAccess = true;
  58. AccessSchedules = new AccessSchedule[] { };
  59. EnableAllChannels = true;
  60. EnabledChannels = new string[] { };
  61. EnableAllFolders = true;
  62. EnabledFolders = new string[] { };
  63. EnabledDevices = new string[] { };
  64. EnableAllDevices = true;
  65. }
  66. }
  67. }