Skip to content

Commit

Permalink
fix duplicate admin ops (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-roberts authored Jan 14, 2025
1 parent 0c61a00 commit afcf0b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/gov/nist/csd/pm/pap/AdminOperations.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,15 @@ public class AdminOperations {
public static Set<String> ADMIN_OP_NAMES = new HashSet<>(adminOperationNames());

public static void init(OperationsStore operationsStore) throws PMException {
Set<String> adminOperationNames = new HashSet<>(operationsStore.getAdminOperationNames());

for (Operation<?> op : ADMIN_OPERATIONS) {
if (adminOperationNames.contains(op.getName())) {
continue;
}

operationsStore.createAdminOperation(op);
adminOperationNames.add(op.getName());
}
}

Expand Down

0 comments on commit afcf0b5

Please sign in to comment.