Skip to content

Commit

Permalink
Add storage id to storage audit logs (#3187), Data Sharing Service GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
rodichenko committed Apr 25, 2023
1 parent 24f77cb commit ce790fc
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import SourceState from '../../../special/hcs-image/utilities/source-state';
import Channels from '../../../special/hcs-image/hcs-image-controls/channels';
import ColorMap from '../../../special/hcs-image/hcs-image-controls/color-map';
import LoadingView from '../../../special/LoadingView';
import auditStorageAccessManager from '../../../../utils/audit-storage-access';
import styles from './ome-tiff-renderer.css';

@observer
Expand Down Expand Up @@ -122,6 +123,13 @@ class OmeTiffRenderer extends React.Component {
state.offsets = offsetsJsonPath
? (await storage.generateFileUrl(offsetsJsonPath))
: undefined;
auditStorageAccessManager.reportReadAccess(...[{
storageId,
path: omeTiffPath
}, offsetsJsonPath ? {
storageId,
path: offsetsJsonPath
} : undefined].filter(Boolean));
} catch (error) {
state.error = error.message;
} finally {
Expand Down

0 comments on commit ce790fc

Please sign in to comment.