Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
FeatureAccessUtils.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2019 Basis Technology Corp.
5 * Contact: carrier <at> sleuthkit <dot> org
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package org.sleuthkit.autopsy.featureaccess;
20
21import java.io.File;
22import java.nio.file.Paths;
23import org.sleuthkit.autopsy.casemodule.Case;
24import org.sleuthkit.autopsy.core.UserPreferences;
25import org.sleuthkit.autopsy.coreutils.PlatformUtil;
26import org.sleuthkit.datamodel.CaseDbSchemaVersionNumber;
27
35final public class FeatureAccessUtils {
36
37 private final static String MULTIUSER_CASE_RESTRICTED_FILE_NAME = "mualimit"; // NON-NLS
39 private static final int DATA_SRC_DEL_MIN_DB_MAJOR_VER = 8;
40 private static final int DATA_SRC_DEL_MIN_DB_MINOR_VER = 4;
41
50
59
65 public static boolean canDeleteDataSources() {
66 boolean dataSourceDeletionAllowed = false;
67 if (Case.isCaseOpen()) {
68 CaseDbSchemaVersionNumber version = Case.getCurrentCase().getSleuthkitCase().getDBSchemaCreationVersion();
69 dataSourceDeletionAllowed
70 = ((version.getMajor() > DATA_SRC_DEL_MIN_DB_MAJOR_VER) || (version.getMajor() == DATA_SRC_DEL_MIN_DB_MAJOR_VER && version.getMinor() >= DATA_SRC_DEL_MIN_DB_MINOR_VER))
72 }
73 return dataSourceDeletionAllowed;
74 }
75
84
91 public static boolean canAddHashSetsToCentralRepo() {
93 }
94
103
110 private static boolean multiUserCaseRestrictionsFileAbsent() {
111 File accessLimitingFile = new File(MULTIUSER_CASE_RESTRICTED_FILE_PATH);
112 return !accessLimitingFile.exists();
113 }
114
119 }
120
121}

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.