mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
add connect linking
This commit is contained in:
@@ -39,7 +39,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
var user = _userManager.GetUserById(new Guid(query.UserId));
|
||||
var user = _userManager.GetUserById(query.UserId);
|
||||
|
||||
inputItems = user.RootFolder.GetRecursiveChildren(user, true);
|
||||
}
|
||||
|
||||
@@ -128,6 +128,16 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
return Users.FirstOrDefault(u => u.Id == id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user by identifier.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>User.</returns>
|
||||
public User GetUserById(string id)
|
||||
{
|
||||
return GetUserById(new Guid(id));
|
||||
}
|
||||
|
||||
public async Task Initialize()
|
||||
{
|
||||
Users = await LoadUsers().ConfigureAwait(false);
|
||||
@@ -219,6 +229,9 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
await UserRepository.SaveUser(user, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
users.Add(user);
|
||||
|
||||
user.Configuration.IsAdministrator = true;
|
||||
UpdateConfiguration(user, user.Configuration);
|
||||
}
|
||||
|
||||
return users;
|
||||
@@ -503,7 +516,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
Name = name,
|
||||
Id = ("MBUser" + name).GetMD5(),
|
||||
DateCreated = DateTime.UtcNow,
|
||||
DateModified = DateTime.UtcNow
|
||||
DateModified = DateTime.UtcNow,
|
||||
UsesIdForConfigurationPath = true
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
public async Task<IEnumerable<Folder>> GetUserViews(UserViewQuery query, CancellationToken cancellationToken)
|
||||
{
|
||||
var user = _userManager.GetUserById(new Guid(query.UserId));
|
||||
var user = _userManager.GetUserById(query.UserId);
|
||||
|
||||
var folders = user.RootFolder
|
||||
.GetChildren(user, true)
|
||||
|
||||
Reference in New Issue
Block a user