mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
Data source deletion support changes
This commit is contained in:
parent
3b8e836204
commit
95769f9bc6
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.casemodule;
|
package org.sleuthkit.autopsy.casemodule;
|
||||||
|
|
||||||
import org.sleuthkit.autopsy.featureaccess.UserFeatureAccessUtils;
|
import org.sleuthkit.autopsy.featureaccess.FeatureAccessUtils;
|
||||||
import com.google.common.annotations.Beta;
|
import com.google.common.annotations.Beta;
|
||||||
import com.google.common.eventbus.Subscribe;
|
import com.google.common.eventbus.Subscribe;
|
||||||
import org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData;
|
import org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData;
|
||||||
@ -1102,7 +1102,7 @@ public class Case {
|
|||||||
/*
|
/*
|
||||||
* Enable the case-specific actions.
|
* Enable the case-specific actions.
|
||||||
*/
|
*/
|
||||||
CallableSystemAction.get(AddImageAction.class).setEnabled(Case.getCurrentCase().getMetadata().getCaseType() == CaseType.SINGLE_USER_CASE || UserFeatureAccessUtils.canCreateOrModifyMultiUserCases());
|
CallableSystemAction.get(AddImageAction.class).setEnabled(Case.getCurrentCase().getMetadata().getCaseType() == CaseType.SINGLE_USER_CASE || FeatureAccessUtils.canCreateOrModifyMultiUserCases());
|
||||||
CallableSystemAction.get(CaseCloseAction.class).setEnabled(true);
|
CallableSystemAction.get(CaseCloseAction.class).setEnabled(true);
|
||||||
CallableSystemAction.get(CaseDetailsAction.class).setEnabled(true);
|
CallableSystemAction.get(CaseDetailsAction.class).setEnabled(true);
|
||||||
CallableSystemAction.get(DataSourceSummaryAction.class).setEnabled(true);
|
CallableSystemAction.get(DataSourceSummaryAction.class).setEnabled(true);
|
||||||
|
@ -27,7 +27,7 @@ import javax.swing.SwingWorker;
|
|||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||||
import org.sleuthkit.autopsy.featureaccess.UserFeatureAccessUtils;
|
import org.sleuthkit.autopsy.featureaccess.FeatureAccessUtils;
|
||||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||||
import org.sleuthkit.datamodel.CaseDbSchemaVersionNumber;
|
import org.sleuthkit.datamodel.CaseDbSchemaVersionNumber;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ public final class DeleteDataSourceAction extends AbstractAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NbBundle.Messages({
|
@NbBundle.Messages({
|
||||||
"DeleteDataSourceAction.confirmationDialog.message=Are you sure you want to delete the selected data source from the case?\n Note that the case will be closed and re-opened during the deletion.",
|
"DeleteDataSourceAction.confirmationDialog.message=Are you sure you want to delete the selected data source from the case?\nNote that the case will be closed and re-opened during the deletion.",
|
||||||
"DeleteDataSourceAction.exceptionMessage.dataSourceDeletionError=An error occurred while deleting the data source.\nPlease see the application log for details.",
|
"DeleteDataSourceAction.exceptionMessage.dataSourceDeletionError=An error occurred while deleting the data source.\nPlease see the application log for details.",
|
||||||
"DeleteDataSourceAction.exceptionMessage.couldNotReopenCase=Failed to re-open the case."
|
"DeleteDataSourceAction.exceptionMessage.couldNotReopenCase=Failed to re-open the case."
|
||||||
})
|
})
|
||||||
@ -113,7 +113,7 @@ public final class DeleteDataSourceAction extends AbstractAction {
|
|||||||
canBeEnabled = ((version.getMajor() > MIN_CASE_DB_SCHEMA_MAJOR_VERSION) || (version.getMajor() == MIN_CASE_DB_SCHEMA_MAJOR_VERSION && version.getMinor() >= MIN_CASE_DB_SCHEMA_MINOR_VERSION))
|
canBeEnabled = ((version.getMajor() > MIN_CASE_DB_SCHEMA_MAJOR_VERSION) || (version.getMajor() == MIN_CASE_DB_SCHEMA_MAJOR_VERSION && version.getMinor() >= MIN_CASE_DB_SCHEMA_MINOR_VERSION))
|
||||||
&& !IngestManager.getInstance().isIngestRunning()
|
&& !IngestManager.getInstance().isIngestRunning()
|
||||||
&& (Case.getCurrentCase().getCaseType() == Case.CaseType.SINGLE_USER_CASE
|
&& (Case.getCurrentCase().getCaseType() == Case.CaseType.SINGLE_USER_CASE
|
||||||
|| UserFeatureAccessUtils.canCreateOrModifyMultiUserCases());
|
|| FeatureAccessUtils.canCreateOrModifyMultiUserCases());
|
||||||
}
|
}
|
||||||
return canBeEnabled;
|
return canBeEnabled;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.casemodule;
|
package org.sleuthkit.autopsy.casemodule;
|
||||||
|
|
||||||
import org.sleuthkit.autopsy.featureaccess.UserFeatureAccessUtils;
|
import org.sleuthkit.autopsy.featureaccess.FeatureAccessUtils;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener {
|
|||||||
*/
|
*/
|
||||||
void readSettings() {
|
void readSettings() {
|
||||||
caseNameTextField.setText("");
|
caseNameTextField.setText("");
|
||||||
if (UserPreferences.getIsMultiUserModeEnabled() && UserFeatureAccessUtils.canCreateOrModifyMultiUserCases()) {
|
if (UserPreferences.getIsMultiUserModeEnabled() && FeatureAccessUtils.canCreateOrModifyMultiUserCases()) {
|
||||||
multiUserCaseRadioButton.setEnabled(true);
|
multiUserCaseRadioButton.setEnabled(true);
|
||||||
multiUserCaseRadioButton.setSelected(true);
|
multiUserCaseRadioButton.setSelected(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -25,7 +25,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
|||||||
/**
|
/**
|
||||||
* Check if access to various features is permitted for the current user.
|
* Check if access to various features is permitted for the current user.
|
||||||
*/
|
*/
|
||||||
final public class UserFeatureAccessUtils {
|
final public class FeatureAccessUtils {
|
||||||
|
|
||||||
private final static String MULTI_USER_ACCESS_FILE_NAME = "mualimit"; // NON-NLS
|
private final static String MULTI_USER_ACCESS_FILE_NAME = "mualimit"; // NON-NLS
|
||||||
private final static String MULTI_USER_ACCESS_FILE_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), MULTI_USER_ACCESS_FILE_NAME).toString();
|
private final static String MULTI_USER_ACCESS_FILE_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), MULTI_USER_ACCESS_FILE_NAME).toString();
|
||||||
@ -42,9 +42,9 @@ final public class UserFeatureAccessUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private constructor to prevent instatiation of this utility class.
|
* Private constructor to prevent instantiation of this utility class.
|
||||||
*/
|
*/
|
||||||
private UserFeatureAccessUtils() {
|
private FeatureAccessUtils() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user