aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2013-02-26 17:19:45 -0500
committerEric Reed <ebr@mediabrowser3.com>2013-02-26 17:19:45 -0500
commit4b2cf29fe1714e2bdef1d75d1b3aefb2f29ab4f6 (patch)
treed1e27ef0a40d9f5aa6e022496fa43b60d1dcba79
parent1925288a860ccc3fcd7364432ac5057eccf044e0 (diff)
Move SecurityManager to BaseKernel/IKernel
-rw-r--r--MediaBrowser.Api/PluginService.cs10
-rw-r--r--MediaBrowser.Common/Kernel/BaseKernel.cs7
-rw-r--r--MediaBrowser.Common/Kernel/IKernel.cs7
-rw-r--r--MediaBrowser.Controller/Kernel.cs9
-rw-r--r--MediaBrowser.Controller/Updates/InstallationManager.cs2
5 files changed, 22 insertions, 13 deletions
diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs
index ab20e1875..3d975090b 100644
--- a/MediaBrowser.Api/PluginService.cs
+++ b/MediaBrowser.Api/PluginService.cs
@@ -203,9 +203,9 @@ namespace MediaBrowser.Api
var result = new PluginSecurityInfo
{
- IsMBSupporter = kernel.PluginSecurityManager.IsMBSupporter,
- SupporterKey = kernel.PluginSecurityManager.SupporterKey,
- LegacyKey = kernel.PluginSecurityManager.LegacyKey
+ IsMBSupporter = kernel.SecurityManager.IsMBSupporter,
+ SupporterKey = kernel.SecurityManager.SupporterKey,
+ LegacyKey = kernel.SecurityManager.LegacyKey
};
return ToOptimizedResult(result);
@@ -221,8 +221,8 @@ namespace MediaBrowser.Api
var info = _jsonSerializer.DeserializeFromStream<PluginSecurityInfo>(request.RequestStream);
- kernel.PluginSecurityManager.SupporterKey = info.SupporterKey;
- kernel.PluginSecurityManager.LegacyKey = info.LegacyKey;
+ kernel.SecurityManager.SupporterKey = info.SupporterKey;
+ kernel.SecurityManager.LegacyKey = info.LegacyKey;
}
/// <summary>
diff --git a/MediaBrowser.Common/Kernel/BaseKernel.cs b/MediaBrowser.Common/Kernel/BaseKernel.cs
index 9e8edce23..44e00877e 100644
--- a/MediaBrowser.Common/Kernel/BaseKernel.cs
+++ b/MediaBrowser.Common/Kernel/BaseKernel.cs
@@ -1,5 +1,6 @@
using MediaBrowser.Common.Events;
using MediaBrowser.Common.Plugins;
+using MediaBrowser.Common.Security;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Serialization;
@@ -153,6 +154,12 @@ namespace MediaBrowser.Common.Kernel
public IServerManager ServerManager { get; private set; }
/// <summary>
+ /// Gets the plug-in security manager.
+ /// </summary>
+ /// <value>The plug-in security manager.</value>
+ public ISecurityManager SecurityManager { get; set; }
+
+ /// <summary>
/// Gets the UDP server port number.
/// This can't be configurable because then the user would have to configure their client to discover the server.
/// </summary>
diff --git a/MediaBrowser.Common/Kernel/IKernel.cs b/MediaBrowser.Common/Kernel/IKernel.cs
index 715dc9a27..4b7375ba1 100644
--- a/MediaBrowser.Common/Kernel/IKernel.cs
+++ b/MediaBrowser.Common/Kernel/IKernel.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Common.Plugins;
+using MediaBrowser.Common.Security;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.System;
using System;
@@ -90,6 +91,12 @@ namespace MediaBrowser.Common.Kernel
IServerManager ServerManager { get; }
/// <summary>
+ /// Gets the plug-in security manager.
+ /// </summary>
+ /// <value>The plug-in security manager.</value>
+ ISecurityManager SecurityManager { get; set; }
+
+ /// <summary>
/// Gets the web socket listeners.
/// </summary>
/// <value>The web socket listeners.</value>
diff --git a/MediaBrowser.Controller/Kernel.cs b/MediaBrowser.Controller/Kernel.cs
index 48dfa5c16..6faa20012 100644
--- a/MediaBrowser.Controller/Kernel.cs
+++ b/MediaBrowser.Controller/Kernel.cs
@@ -1,6 +1,7 @@
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.ScheduledTasks;
+using MediaBrowser.Common.Security;
using MediaBrowser.Common.Updates;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Entities;
@@ -92,12 +93,6 @@ namespace MediaBrowser.Controller
public UserDataManager UserDataManager { get; private set; }
/// <summary>
- /// Gets the plug-in security manager.
- /// </summary>
- /// <value>The plug-in security manager.</value>
- public PluginSecurityManager PluginSecurityManager { get; private set; }
-
- /// <summary>
/// The _users
/// </summary>
private IEnumerable<User> _users;
@@ -321,7 +316,7 @@ namespace MediaBrowser.Controller
ImageManager = (ImageManager)ApplicationHost.CreateInstance(typeof(ImageManager));
ProviderManager = (ProviderManager)ApplicationHost.CreateInstance(typeof(ProviderManager));
UserDataManager = (UserDataManager)ApplicationHost.CreateInstance(typeof(UserDataManager));
- PluginSecurityManager = (PluginSecurityManager)ApplicationHost.CreateInstance(typeof(PluginSecurityManager));
+ SecurityManager = (PluginSecurityManager)ApplicationHost.CreateInstance(typeof(PluginSecurityManager));
base.FindParts();
diff --git a/MediaBrowser.Controller/Updates/InstallationManager.cs b/MediaBrowser.Controller/Updates/InstallationManager.cs
index 64b72ae63..633cc6bc3 100644
--- a/MediaBrowser.Controller/Updates/InstallationManager.cs
+++ b/MediaBrowser.Controller/Updates/InstallationManager.cs
@@ -183,7 +183,7 @@ namespace MediaBrowser.Controller.Updates
PackageType? packageType = null,
Version applicationVersion = null)
{
- var data = new Dictionary<string, string> { { "key", Kernel.PluginSecurityManager.SupporterKey }, { "mac", _networkManager.GetMacAddress() } };
+ var data = new Dictionary<string, string> { { "key", Kernel.SecurityManager.SupporterKey }, { "mac", _networkManager.GetMacAddress() } };
using (var json = await HttpClient.Post(Controller.Kernel.MBAdminUrl + "service/package/retrieveall", data, Kernel.ResourcePools.Mb, cancellationToken).ConfigureAwait(false))
{