mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Fix permission checks
This commit is contained in:
parent
0a982e2bfd
commit
ffa1c370fd
@ -1886,7 +1886,7 @@ namespace Emby.Server.Implementations.Session
|
||||
if (!user.HasPermission(PermissionKind.EnableRemoteControlOfOtherUsers))
|
||||
{
|
||||
// User cannot control other user's sessions, validate user id.
|
||||
result = result.Where(i => i.UserId.IsEmpty() || i.ContainsUser(controllableUserToCheck.Value));
|
||||
result = result.Where(i => i.UserId.IsEmpty() || i.ContainsUser(user.Id));
|
||||
}
|
||||
|
||||
result = result.Where(i =>
|
||||
@ -1903,7 +1903,10 @@ namespace Emby.Server.Implementations.Session
|
||||
{
|
||||
// Request isn't from administrator, limit to "own" sessions.
|
||||
result = result.Where(i => i.UserId.IsEmpty() || i.ContainsUser(userId));
|
||||
}
|
||||
|
||||
if (!user.HasPermission(PermissionKind.IsAdministrator))
|
||||
{
|
||||
// Don't report acceleration type for non-admin users.
|
||||
result = result.Select(r =>
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user