mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 09:14:45 +03:00
don't show sync profile for audio jobs
This commit is contained in:
@@ -41,8 +41,6 @@ namespace MediaBrowser.Api
|
||||
public ISessionContext SessionContext { get; set; }
|
||||
public IAuthorizationContext AuthorizationContext { get; set; }
|
||||
|
||||
public IUserManager UserManager { get; set; }
|
||||
|
||||
public string GetHeader(string name)
|
||||
{
|
||||
return Request.Headers[name];
|
||||
@@ -75,11 +73,11 @@ namespace MediaBrowser.Api
|
||||
return ResultFactory.GetOptimizedResultUsingCache(Request, cacheKey, lastDateModified, cacheDuration, factoryFn);
|
||||
}
|
||||
|
||||
protected void AssertCanUpdateUser(string userId)
|
||||
protected void AssertCanUpdateUser(IUserManager userManager, string userId)
|
||||
{
|
||||
var auth = AuthorizationContext.GetAuthorizationInfo(Request);
|
||||
|
||||
var authenticatedUser = UserManager.GetUserById(auth.UserId);
|
||||
var authenticatedUser = userManager.GetUserById(auth.UserId);
|
||||
|
||||
// If they're going to update the record of another user, they must be an administrator
|
||||
if (!string.Equals(userId, auth.UserId, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
Reference in New Issue
Block a user