Autopsy  4.17.0
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  */
19 package org.sleuthkit.autopsy.featureaccess;
20 
21 import java.io.File;
22 import java.nio.file.Paths;
26 import org.sleuthkit.datamodel.CaseDbSchemaVersionNumber;
27 
35 final 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 
47  public static boolean canCreateMultiUserCases() {
49  }
50 
56  public static boolean canAddDataSources() {
58  }
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 
81  public static boolean canDeleteCurrentCase() {
83  }
84 
91  public static boolean canAddHashSetsToCentralRepo() {
93  }
94 
100  private static boolean currentCaseIsSingleUserCase() {
102  }
103 
110  private static boolean multiUserCaseRestrictionsFileAbsent() {
111  File accessLimitingFile = new File(MULTIUSER_CASE_RESTRICTED_FILE_PATH);
112  return !accessLimitingFile.exists();
113  }
114 
118  private FeatureAccessUtils() {
119  }
120 
121 }

Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.