V14: Move towards get guid (#15889)
* Implement using keymap for member * Remove current usages of GetUserById * User userId resolver to resolve user key * Refactor user repository to use GUID not int * Add happy path test * Remove user in cache when user gets updated * Use await in async method * Fix up according to review * Update IMetricsConsentService.cs to have async method * Fix according to review * Fix more according to comments * Revert "Fix up according to review" This reverts commit a75acaaa * Get current backoffice user from method * Update user repository delete functionality * Fix up more test * Try to get user by id if key fails * Add user key as required claim * Fix tests * Don't set claim in BackofficeController * Create constant for the Sub claim --------- Co-authored-by: kjac <kja@umbraco.dk>
This commit is contained in:
@@ -18,6 +18,7 @@ public class ClaimsPrincipalExtensionsTests
|
||||
var backOfficeIdentity = new ClaimsIdentity();
|
||||
backOfficeIdentity.AddRequiredClaims(
|
||||
Constants.Security.SuperUserIdAsString,
|
||||
Constants.Security.SuperUserKey,
|
||||
"test",
|
||||
"test",
|
||||
Enumerable.Empty<int>(),
|
||||
@@ -55,6 +56,7 @@ public class ClaimsPrincipalExtensionsTests
|
||||
var backOfficeIdentity = new ClaimsIdentity();
|
||||
backOfficeIdentity.AddRequiredClaims(
|
||||
Constants.Security.SuperUserIdAsString,
|
||||
Constants.Security.SuperUserKey,
|
||||
"test",
|
||||
"test",
|
||||
Enumerable.Empty<int>(),
|
||||
|
||||
Reference in New Issue
Block a user