Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

@code {
private Dictionary<string, List<DocIndexItem>>? _groups;
private DocIndexItem? _selectedValue;
private bool _expanded = true;

[Parameter]
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class CreateUserDialog

private async Task CreateUserAsync()
{
await _form.Validate();
await _form.ValidateAsync();

if (!_form.IsValid)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private async Task ChangePasswordAsync()
if (_form is null)
return;

await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
{
Snackbar.Add("Form is not valid.", Severity.Error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private async Task SaveAsync()

if (_form is not null)
{
await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override async Task OnInitializedAsync()

private async Task HandleRegisterAsync()
{
await _form.Validate();
await _form.ValidateAsync();

if (!_form.IsValid)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class ResetCredential

private async Task ResetPasswordAsync()
{
await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
{
Snackbar.Add("Please fix the validation errors.", Severity.Error);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class CreateUserDialog

private async Task CreateUserAsync()
{
await _form.Validate();
await _form.ValidateAsync();

if (!_form.IsValid)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private async Task ChangePasswordAsync()
if (_form is null)
return;

await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
{
Snackbar.Add("Form is not valid.", Severity.Error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private async Task SaveAsync()

if (_form is not null)
{
await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override async Task OnInitializedAsync()

private async Task HandleRegisterAsync()
{
await _form.Validate();
await _form.ValidateAsync();

if (!_form.IsValid)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class ResetCredential

private async Task ResetPasswordAsync()
{
await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
{
Snackbar.Add("Please fix the validation errors.", Severity.Error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class CreateUserDialog

private async Task CreateUserAsync()
{
await _form.Validate();
await _form.ValidateAsync();

if (!_form.IsValid)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private async Task ChangePasswordAsync()
if (_form is null)
return;

await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
{
Snackbar.Add("Form is not valid.", Severity.Error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private async Task SaveAsync()

if (_form is not null)
{
await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override async Task OnInitializedAsync()

private async Task HandleRegisterAsync()
{
await _form.Validate();
await _form.ValidateAsync();

if (!_form.IsValid)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class ResetCredential

private async Task ResetPasswordAsync()
{
await _form.Validate();
await _form.ValidateAsync();
if (!_form.IsValid)
{
Snackbar.Add("Please fix the validation errors.", Severity.Error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ public async Task RevokeUserSessionAsync(AccessContext context, UserKey userKey,
var expected = session.Version;
var revoked = session.Revoke(now);

await store.SaveSessionAsync(revoked, expected);
await store.ExecuteAsync(async innerCt2 => {
await store.SaveSessionAsync(revoked, expected);
});
});

await _accessOrchestrator.ExecuteAsync(context, command, ct);
Expand All @@ -176,7 +178,10 @@ public async Task<RevokeResult> RevokeUserChainAsync(AccessContext context, User
{
var isCurrent = context.ActorChainId == chainId;
var store = _storeFactory.Create(context.ResourceTenant);
await store.RevokeChainCascadeAsync(chainId, _clock.UtcNow);

await store.ExecuteAsync(async innerCt2 => {
await store.RevokeChainCascadeAsync(chainId, _clock.UtcNow);
});

return new RevokeResult
{
Expand All @@ -198,15 +203,18 @@ public async Task RevokeAllChainsAsync(AccessContext context, UserKey userKey, S
var command = new AccessCommand(async innerCt =>
{
var store = _storeFactory.Create(context.ResourceTenant);
var chains = await store.GetChainsByUserAsync(userKey);

foreach (var chain in chains)
{
if (exceptChainId.HasValue && chain.ChainId == exceptChainId.Value)
continue;
await store.ExecuteAsync(async innerCt2 => {
var chains = await store.GetChainsByUserAsync(userKey);

await store.RevokeChainCascadeAsync(chain.ChainId, _clock.UtcNow);
}
foreach (var chain in chains)
{
if (exceptChainId.HasValue && chain.ChainId == exceptChainId.Value)
continue;

await store.RevokeChainCascadeAsync(chain.ChainId, _clock.UtcNow);
}
});
});

await _accessOrchestrator.ExecuteAsync(context, command, ct);
Expand All @@ -220,7 +228,9 @@ public async Task<RevokeResult> LogoutDeviceAsync(AccessContext context, Session
var store = _storeFactory.Create(context.ResourceTenant);
var now = _clock.UtcNow;

await store.LogoutChainAsync(currentChainId, now, innerCt);
await store.ExecuteAsync(async innerCt2 => {
await store.LogoutChainAsync(currentChainId, now, innerCt2);
});

return new RevokeResult
{
Expand All @@ -239,7 +249,10 @@ public async Task LogoutOtherDevicesAsync(AccessContext context, UserKey userKey
var store = _storeFactory.Create(context.ResourceTenant);
var now = _clock.UtcNow;

await store.RevokeOtherSessionsAsync(userKey, currentChainId, now, innerCt);
await store.ExecuteAsync(async innerCt2 => {
await store.RevokeOtherSessionsAsync(userKey, currentChainId, now, innerCt2);
});

});

await _accessOrchestrator.ExecuteAsync(context, command, ct);
Expand All @@ -252,7 +265,9 @@ public async Task LogoutAllDevicesAsync(AccessContext context, UserKey userKey,
var store = _storeFactory.Create(context.ResourceTenant);
var now = _clock.UtcNow;

await store.RevokeAllSessionsAsync(userKey, now, innerCt);
await store.ExecuteAsync(async innerCt2 => {
await store.RevokeAllSessionsAsync(userKey, now, innerCt2);
});
});

await _accessOrchestrator.ExecuteAsync(context, command, ct);
Expand All @@ -263,7 +278,10 @@ public async Task RevokeRootAsync(AccessContext context, UserKey userKey, Cancel
var command = new AccessCommand(async innerCt =>
{
var store = _storeFactory.Create(context.ResourceTenant);
await store.RevokeRootCascadeAsync(userKey, _clock.UtcNow);

await store.ExecuteAsync(async innerCt2 => {
await store.RevokeRootCascadeAsync(userKey, _clock.UtcNow);
});
});

await _accessOrchestrator.ExecuteAsync(context, command, ct);
Expand Down
Loading
Loading