aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Api/Session/SessionsService.cs3
-rw-r--r--MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs6
-rw-r--r--MediaBrowser.Server.Implementations/Security/AuthenticationRepository.cs12
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj6
4 files changed, 26 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs
index 1160f685c..416c4fff9 100644
--- a/MediaBrowser.Api/Session/SessionsService.cs
+++ b/MediaBrowser.Api/Session/SessionsService.cs
@@ -355,7 +355,8 @@ namespace MediaBrowser.Api.Session
{
var result = _authRepo.Get(new AuthenticationInfoQuery
{
- IsActive = true
+ IsActive = true,
+ HasUser = false
});
return ToOptimizedResult(result);
diff --git a/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs b/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs
index 3234b0350..273dfd43c 100644
--- a/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs
+++ b/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs
@@ -28,6 +28,12 @@ namespace MediaBrowser.Controller.Security
public bool? IsActive { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether this instance has user.
+ /// </summary>
+ /// <value><c>null</c> if [has user] contains no value, <c>true</c> if [has user]; otherwise, <c>false</c>.</value>
+ public bool? HasUser { get; set; }
+
+ /// <summary>
/// Gets or sets the start index.
/// </summary>
/// <value>The start index.</value>
diff --git a/MediaBrowser.Server.Implementations/Security/AuthenticationRepository.cs b/MediaBrowser.Server.Implementations/Security/AuthenticationRepository.cs
index df7cc47f4..b36db51b3 100644
--- a/MediaBrowser.Server.Implementations/Security/AuthenticationRepository.cs
+++ b/MediaBrowser.Server.Implementations/Security/AuthenticationRepository.cs
@@ -185,6 +185,18 @@ namespace MediaBrowser.Server.Implementations.Security
cmd.Parameters.Add(cmd, "@IsActive", DbType.Boolean).Value = query.IsActive.Value;
}
+ if (query.HasUser.HasValue)
+ {
+ if (query.HasUser.Value)
+ {
+ whereClauses.Add("UserId not null");
+ }
+ else
+ {
+ whereClauses.Add("UserId is null");
+ }
+ }
+
var whereTextWithoutPaging = whereClauses.Count == 0 ?
string.Empty :
" where " + string.Join(" AND ", whereClauses.ToArray());
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index 48a8bf253..2a2515197 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -293,6 +293,9 @@
<Content Include="dashboard-ui\scripts\secondaryitems.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\scripts\serversecurity.js">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\scripts\shared.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -323,6 +326,9 @@
<Content Include="dashboard-ui\secondaryitems.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\serversecurity.html">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\shared.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>