UserPolicy.cs 3.1 KB

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