Throw from IUserIdKeyResolver if id/key not found. (#14101)
* Throw from IUserIdKeyResolver if id/key not found. This is too critical to not throw. * Fixed tests * Explicitly test that we can resolve super user key/ID from their counterparts --------- Co-authored-by: kjac <kja@umbraco.dk>
This commit is contained in:
@@ -7,12 +7,12 @@ public interface IUserIdKeyResolver
|
||||
/// </summary>
|
||||
/// <param name="key">The key of the user. </param>
|
||||
/// <returns>The id of the user, null if the user doesn't exist.</returns>
|
||||
public Task<int?> GetAsync(Guid key);
|
||||
public Task<int> GetAsync(Guid key);
|
||||
|
||||
/// <summary>
|
||||
/// Tries to resolve a user id to a user key without fetching the entire user.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the user. </param>
|
||||
/// <returns>The key of the user, null if the user doesn't exist.</returns>
|
||||
public Task<Guid?> GetAsync(int id);
|
||||
public Task<Guid> GetAsync(int id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user