mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Cryptography service now handles random byte generation
Protected strings are now protected in memory
This commit is contained in:
@@ -29,7 +29,7 @@ namespace ModernKeePass.Application.Group.Commands.CreateGroup
|
||||
|
||||
var group = _database.CreateGroup(message.ParentGroup.Id, message.Name, message.IsRecycleBin);
|
||||
var groupVm = _mapper.Map<GroupVm>(group);
|
||||
message.ParentGroup.SubGroups.Add(groupVm);
|
||||
message.ParentGroup.Groups.Add(groupVm);
|
||||
return groupVm;
|
||||
}
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ namespace ModernKeePass.Application.Group.Commands.MoveGroup
|
||||
if (!_database.IsOpen) throw new DatabaseClosedException();
|
||||
|
||||
await _database.MoveGroup(message.ParentGroup.Id, message.Group.Id, message.Index);
|
||||
message.ParentGroup.SubGroups.Insert(message.Index, message.Group);
|
||||
message.ParentGroup.Groups.Insert(message.Index, message.Group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ namespace ModernKeePass.Application.Group.Commands.SortGroups
|
||||
if (!_database.IsOpen) throw new DatabaseClosedException();
|
||||
|
||||
_database.SortSubGroups(message.Group.Id);
|
||||
message.Group.SubGroups = message.Group.SubGroups.OrderBy(g => g.Title).ToList();
|
||||
message.Group.Groups = message.Group.Groups.OrderBy(g => g.Title).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ namespace ModernKeePass.Application.Group.Models
|
||||
public string Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public Icon Icon { get; set; }
|
||||
public List<GroupVm> SubGroups { get; set; }
|
||||
public List<GroupVm> Groups { get; set; }
|
||||
public List<EntryVm> Entries { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
@@ -26,13 +26,7 @@ namespace ModernKeePass.Application.Group.Models
|
||||
public void Mapping(Profile profile)
|
||||
{
|
||||
profile.CreateMap<GroupEntity, GroupVm>()
|
||||
.ForMember(d => d.ParentGroupId, opts => opts.MapFrom(s => s.ParentId))
|
||||
.ForMember(d => d.ParentGroupName, opts => opts.MapFrom(s => s.ParentName))
|
||||
.ForMember(d => d.Id, opts => opts.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.Title, opts => opts.MapFrom(s => s.Name))
|
||||
.ForMember(d => d.Icon, opts => opts.MapFrom(s => s.Icon))
|
||||
.ForMember(d => d.Entries, opts => opts.MapFrom(s => s.Entries))
|
||||
.ForMember(d => d.SubGroups, opts => opts.MapFrom(s => s.SubGroups))
|
||||
.MaxDepth(2);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user