mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-20 11:26:53 +00:00
Removed the edit comment from the data result popup menu
This commit is contained in:
parent
c84725c979
commit
ead84a3dc6
@ -28,6 +28,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeUti
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.ContextMenuActionsProvider;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
|
||||
import org.sleuthkit.datamodel.DataArtifact;
|
||||
|
||||
/**
|
||||
* This creates a single context menu item for adding or editing a Central
|
||||
@ -39,19 +40,23 @@ public class CentralRepoContextMenuActionsProvider implements ContextMenuActions
|
||||
@Override
|
||||
public List<Action> getActions() {
|
||||
ArrayList<Action> actionsList = new ArrayList<>();
|
||||
Collection<? extends AbstractFile> selectedFiles = Utilities.actionsGlobalContext().lookupAll(AbstractFile.class);
|
||||
|
||||
Collection<? extends DataArtifact> artifacts = Utilities.actionsGlobalContext().lookupAll(DataArtifact.class);
|
||||
if(artifacts.isEmpty()) {
|
||||
Collection<? extends AbstractFile> selectedFiles = Utilities.actionsGlobalContext().lookupAll(AbstractFile.class);
|
||||
|
||||
if (selectedFiles.size() != 1) {
|
||||
return actionsList;
|
||||
}
|
||||
if (selectedFiles.size() != 1) {
|
||||
return actionsList;
|
||||
}
|
||||
|
||||
for (AbstractFile file : selectedFiles) {
|
||||
if (CentralRepository.isEnabled() && CorrelationAttributeUtil.isSupportedAbstractFileType(file) && file.isFile()) {
|
||||
AddEditCentralRepoCommentAction action = new AddEditCentralRepoCommentAction(file);
|
||||
if (action.getCorrelationAttribute() == null) {
|
||||
action.setEnabled(false);
|
||||
for (AbstractFile file : selectedFiles) {
|
||||
if (CentralRepository.isEnabled() && CorrelationAttributeUtil.isSupportedAbstractFileType(file) && file.isFile()) {
|
||||
AddEditCentralRepoCommentAction action = new AddEditCentralRepoCommentAction(file);
|
||||
if (action.getCorrelationAttribute() == null) {
|
||||
action.setEnabled(false);
|
||||
}
|
||||
actionsList.add(action);
|
||||
}
|
||||
actionsList.add(action);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,6 @@ public class DataArtifactNode extends ArtifactNode<DataArtifact, DataArtifactRow
|
||||
|
||||
@Override
|
||||
protected boolean shouldUpdateSCOColumns(long eventObjId) {
|
||||
return eventObjId == getRowDTO().getArtifact().getObjectID();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user