Skip to content

Commit

Permalink
make filter method private
Browse files Browse the repository at this point in the history
  • Loading branch information
tunacicek committed Aug 21, 2023
1 parent ced9d25 commit 6a56248
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public Shell filterShellProperties( Shell shell, String externalSubjectId ) {
return shell.withIdentifiers( filteredIdentifiers );
}

public Set<ShellIdentifier> filterSpecificAssetIdsByTenantId( Set<ShellIdentifier> shellIdentifiers, String tenantId ) {
private Set<ShellIdentifier> filterSpecificAssetIdsByTenantId( Set<ShellIdentifier> shellIdentifiers, String tenantId ) {
// the owning tenant should always see all identifiers
if ( tenantId.equals( owningTenantId ) ) {
return shellIdentifiers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ public List<String> findExternalShellIdsByIdentifiersByAnyMatch(Set<ShellIdentif
@Transactional(readOnly = true)
public List<Shell> findShellsByExternalShellIds(Set<String> externalShellIds,String externalSubjectId) {
return shellRepository.findShellsByIdExternalIsIn(externalShellIds).stream()
.map(shell -> shell.withIdentifiers(shellAccessHandler.filterSpecificAssetIdsByTenantId(shell.getIdentifiers(), externalSubjectId)))
.collect(Collectors.toList());
.map(shell -> shellAccessHandler.filterShellProperties( shell, externalSubjectId ))
.collect(Collectors.toList());
}

@Transactional
Expand Down

0 comments on commit 6a56248

Please sign in to comment.