fIxed issue with filtering
This commit is contained in:
@@ -6,12 +6,12 @@ namespace Bitvault;
|
||||
public class OpenContainerHandler(ContainerConfiguration configuration,
|
||||
ISecurityKeyFactory keyVaultFactory,
|
||||
IContainerStorageFactory vaultStorage) :
|
||||
IHandler<ActivateEventArgs<ContainerToken>, bool>
|
||||
IHandler<ActivateEventArgs<Container>, bool>
|
||||
{
|
||||
public async Task<bool> Handle(ActivateEventArgs<ContainerToken> args,
|
||||
public async Task<bool> Handle(ActivateEventArgs<Container> args,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
if (args.Value is ContainerToken container && configuration.Name is { Length: > 0 } name && container.Password is { Length: > 0 } password)
|
||||
if (args.Value is Container container && configuration.Name is { Length: > 0 } name && container.Password is { Length: > 0 } password)
|
||||
{
|
||||
if (configuration.Key?.Split(':') is { Length: >= 2 } keyPart)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user