UserPolicy.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 UserPolicy()
  46. {
  47. EnableLiveTvManagement = true;
  48. EnableMediaPlayback = true;
  49. EnableLiveTvAccess = true;
  50. EnableSharedDeviceControl = true;
  51. BlockedMediaFolders = new string[] { };
  52. BlockedTags = new string[] { };
  53. BlockedChannels = new string[] { };
  54. BlockUnratedItems = new UnratedItem[] { };
  55. EnableUserPreferenceAccess = true;
  56. AccessSchedules = new AccessSchedule[] { };
  57. EnabledDevices = new string[] { };
  58. EnableAllDevices = true;
  59. }
  60. }
  61. }