Skip to content

Commit

Permalink
Back to the control schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgaldi committed Jan 30, 2024
1 parent 256adc7 commit 691ef6c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class JBrowseUserDatasetsService extends UserService {

private static final Logger LOG = Logger.getLogger(JBrowseUserDatasetsService.class);
private static final String VDI_DATASET_DIR_KEY = "VDI_DATASETS_DIRECTORY";
private static final String VDI_DATA_SCHEMA_KEY ="VDI_DATASETS_SCHEMA";
private static final String VDI_CONTROL_SCHEMA_KEY ="VDI_CONTROL_SCHEMA";

public JBrowseUserDatasetsService(@PathParam(USER_ID_PATH_PARAM) String uid) {
super(uid);
Expand Down Expand Up @@ -152,7 +152,7 @@ private List<JBrowseTrack> fetchTracksFromFilesystem(VDIDatasetReference vdiData
}

private boolean datasetBelongsToUser(long userID, String datasetID) {
final String schema = getWdkModel().getProperties().get(VDI_DATA_SCHEMA_KEY);
final String schema = getWdkModel().getProperties().get(VDI_CONTROL_SCHEMA_KEY);
String sql = String.format(
"SELECT user_dataset_id FROM %s.AvailableUserDatasets da WHERE da.user_id = ? AND da.user_dataset_id = ?",
schema.toLowerCase(Locale.ROOT)
Expand All @@ -172,7 +172,7 @@ private boolean datasetBelongsToUser(long userID, String datasetID) {
* @return List of visible datasets.
*/
private List<VDIDatasetReference> queryVisibleDatasets(long userID) {
final String schema = getWdkModel().getProperties().get(VDI_DATA_SCHEMA_KEY);
final String schema = getWdkModel().getProperties().get(VDI_CONTROL_SCHEMA_KEY);
String sql = String.format(
"SELECT user_dataset_id, type, name, description FROM %s.AvailableUserDatasets da WHERE da.user_id = ?",
schema.toLowerCase(Locale.ROOT)
Expand Down

0 comments on commit 691ef6c

Please sign in to comment.