Skip to content

Commit

Permalink
Merge pull request #101 from aschnell/master
Browse files Browse the repository at this point in the history
- check that name of encryption is unique
  • Loading branch information
aschnell authored Jul 11, 2024
2 parents 6499353 + 4d58cf1 commit 59a39ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions barrel/create-encryption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ namespace barrel
{
Devicegraph* staging = state.storage->get_staging();

for (const Encryption* encryption : Encryption::get_all(staging))
{
if (encryption->get_dm_table_name() == options.name)
throw runtime_error(_("name of encryption already exists"));
}

EncryptionType type = options.type.value();

string dm_name = options.name;
Expand Down

0 comments on commit 59a39ce

Please sign in to comment.