Skip to content

Commit 380005f

Browse files
GitHub Issue 1307: Simplify container filtering in GetTransactionRowIdsAction (#7841)
## Rationale We no longer support cross-folder imports, so no need to look beyond the current container ## Related Pull Requests - <!-- list of links to related pull requests (replace this comment) --> ## Changes - Always use the current container for filtering purposes ## Tasks 📍 - [x] Claude Code Review - ~Manual Testing~ - ~Test Automation~
1 parent d837e55 commit 380005f

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

audit/src/org/labkey/audit/AuditController.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,9 @@ public Object execute(AuditTransactionForm form, BindException errors)
383383
{
384384
AuditLogImpl.TransactionRowIds results;
385385
User elevatedUser = ElevatedUser.ensureCanSeeAuditLogRole(getContainer(), getUser());
386-
ContainerFilter cf = ContainerFilter.getContainerFilterByName(form.getContainerFilter(), getContainer(), elevatedUser);
386+
// Issue 1307: scope strictly to the current container. 26.7 removed cross-folder imports, so a
387+
// transaction's rows live in the same container as the transaction
388+
ContainerFilter cf = ContainerFilter.Type.Current.create(getContainer(), elevatedUser);
387389
if (form.isSampleType())
388390
results = AuditLogImpl.get().getTransactionSampleIds(form.getTransactionAuditId(), elevatedUser, getContainer(), cf);
389391
else
@@ -403,7 +405,6 @@ public static class AuditTransactionForm
403405
private Long _transactionAuditId;
404406
private String _dataType;
405407
private boolean _isSampleType;
406-
String _containerFilter;
407408

408409
public Long getTransactionAuditId()
409410
{
@@ -430,16 +431,6 @@ public boolean isSampleType()
430431
return _isSampleType;
431432
}
432433

433-
public String getContainerFilter()
434-
{
435-
return _containerFilter;
436-
}
437-
438-
public void setContainerFilter(String containerFilter)
439-
{
440-
_containerFilter = containerFilter;
441-
}
442-
443434
public void validate(Errors errors)
444435
{
445436
if (getTransactionAuditId() == null)

0 commit comments

Comments
 (0)