start using user policy

This commit is contained in:
Luke Pulverenti
2014-12-20 01:06:27 -05:00
parent e55ab989d2
commit 8807e80d0a
66 changed files with 546 additions and 323 deletions

View File

@@ -42,6 +42,10 @@ namespace MediaBrowser.Model.Configuration
/// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
public bool IsHidden { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is disabled.
/// </summary>
/// <value><c>true</c> if this instance is disabled; otherwise, <c>false</c>.</value>
public bool IsDisabled { get; set; }
public bool DisplayMissingEpisodes { get; set; }
@@ -74,9 +78,6 @@ namespace MediaBrowser.Model.Configuration
public string[] OrderedViews { get; set; }
public bool SyncConnectName { get; set; }
public bool SyncConnectImage { get; set; }
public bool IncludeTrailersInSuggestions { get; set; }
public bool EnableCinemaMode { get; set; }
@@ -87,7 +88,9 @@ namespace MediaBrowser.Model.Configuration
public string[] LatestItemsExcludes { get; set; }
public string[] BlockedTags { get; set; }
public bool ValuesMigratedToPolicy { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="UserConfiguration" /> class.
/// </summary>
@@ -110,8 +113,6 @@ namespace MediaBrowser.Model.Configuration
ExcludeFoldersFromGrouping = new string[] { };
DisplayCollectionsView = true;
SyncConnectName = true;
SyncConnectImage = true;
IncludeTrailersInSuggestions = true;
EnableCinemaMode = true;
EnableUserPreferenceAccess = true;

View File

@@ -366,6 +366,7 @@
<Compile Include="Sync\SyncCategory.cs" />
<Compile Include="Sync\SyncDialogOptions.cs" />
<Compile Include="Sync\SyncHelper.cs" />
<Compile Include="Sync\SyncItem.cs" />
<Compile Include="Sync\SyncJob.cs" />
<Compile Include="Sync\SyncJobCreationResult.cs" />
<Compile Include="Sync\SyncJobItem.cs" />

View File

@@ -1,8 +1,69 @@

using MediaBrowser.Model.Configuration;
namespace MediaBrowser.Model.Users
{
public class UserPolicy
{
/// <summary>
/// Gets or sets a value indicating whether this instance is administrator.
/// </summary>
/// <value><c>true</c> if this instance is administrator; otherwise, <c>false</c>.</value>
public bool IsAdministrator { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is hidden.
/// </summary>
/// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
public bool IsHidden { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is disabled.
/// </summary>
/// <value><c>true</c> if this instance is disabled; otherwise, <c>false</c>.</value>
public bool IsDisabled { get; set; }
/// <summary>
/// Gets or sets the max parental rating.
/// </summary>
/// <value>The max parental rating.</value>
public int? MaxParentalRating { get; set; }
public string[] BlockedTags { get; set; }
public bool EnableUserPreferenceAccess { get; set; }
public AccessSchedule[] AccessSchedules { get; set; }
public UnratedItem[] BlockUnratedItems { get; set; }
public string[] BlockedMediaFolders { get; set; }
public string[] BlockedChannels { get; set; }
public bool EnableRemoteControlOfOtherUsers { get; set; }
public bool EnableSharedDeviceControl { get; set; }
public bool EnableLiveTvManagement { get; set; }
public bool EnableLiveTvAccess { get; set; }
public bool EnableMediaPlayback { get; set; }
public bool EnableContentDeletion { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [enable synchronize].
/// </summary>
/// <value><c>true</c> if [enable synchronize]; otherwise, <c>false</c>.</value>
public bool EnableSync { get; set; }
public UserPolicy()
{
EnableLiveTvManagement = true;
EnableMediaPlayback = true;
EnableLiveTvAccess = true;
EnableSharedDeviceControl = true;
BlockedMediaFolders = new string[] { };
BlockedTags = new string[] { };
BlockedChannels = new string[] { };
BlockUnratedItems = new UnratedItem[] { };
EnableUserPreferenceAccess = true;
AccessSchedules = new AccessSchedule[] { };
}
}
}