Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/src/org/labkey/api/settings/AppProps.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public interface AppProps
String SCOPE_OPTIONAL_FEATURE = "ExperimentalFeature"; // Startup property prefix for all optional features; "Experimental" for historical reasons.
String EXPERIMENTAL_NO_GUESTS = "disableGuestAccount";
String EXPERIMENTAL_BLOCKER = "blockMaliciousClients";
String DEPRECATED_DERIVE_SAMPLES_NOT_IN_APP = "deriveSamplesNotInApp";
String EXPERIMENTAL_RESOLVE_PROPERTY_URI_COLUMNS = "resolve-property-uri-columns";
String ADMIN_PROVIDED_ALLOWED_EXTERNAL_RESOURCES = "allowedExternalResources";
String QUANTITY_COLUMN_SUFFIX_TESTING = "quantityColumnSuffixTesting";
Expand Down
8 changes: 8 additions & 0 deletions experiment/src/org/labkey/experiment/ExperimentModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
import org.labkey.api.security.User;
import org.labkey.api.security.roles.RoleManager;
import org.labkey.api.settings.AppProps;
import org.labkey.api.settings.OptionalFeatureFlag;
import org.labkey.api.settings.OptionalFeatureService;
import org.labkey.api.usageMetrics.UsageMetricsService;
import org.labkey.api.util.GUID;
Expand Down Expand Up @@ -264,6 +265,13 @@ protected void init()
ExperimentService.get().registerNameExpressionType("aliquots", "exp", "MaterialSource", "aliquotnameexpression");
ExperimentService.get().registerNameExpressionType("dataclass", "exp", "DataClass", "nameexpression");

OptionalFeatureService.get().addFeatureFlag(new OptionalFeatureFlag(
AppProps.DEPRECATED_DERIVE_SAMPLES_NOT_IN_APP,
"Derive Samples in LabKey Server UI",
"Enables the UI for deriving samples in LabKey Server UI from either the samples grids or a sample lineage page. This option will be removed in LabKey Server 26.11",
false,
false,
OptionalFeatureService.FeatureType.Deprecated));
OptionalFeatureService.get().addExperimentalFeatureFlag(AppProps.EXPERIMENTAL_RESOLVE_PROPERTY_URI_COLUMNS, "Resolve property URIs as columns on experiment tables",
"If a column is not found on an experiment table, attempt to resolve the column name as a Property URI and add it as a property column", false, true);
if (CoreSchema.getInstance().getSqlDialect().isSqlServer())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
import org.labkey.api.security.permissions.UpdatePermission;
import org.labkey.api.settings.AppProps;
import org.labkey.api.settings.ConceptURIProperties;
import org.labkey.api.settings.OptionalFeatureService;
import org.labkey.api.sql.LabKeySql;
import org.labkey.api.study.Dataset;
import org.labkey.api.study.StudyService;
Expand Down Expand Up @@ -1107,7 +1108,8 @@ public ModelAndView getView(Object o, BindException errors)
protected void populateButtonBar(DataView view, ButtonBar bar)
{
super.populateButtonBar(view, bar);
bar.add(SampleTypeContentsView.getDeriveSamplesButton(getContainer(),null));
if (OptionalFeatureService.get().isFeatureEnabled(AppProps.DEPRECATED_DERIVE_SAMPLES_NOT_IN_APP))
bar.add(SampleTypeContentsView.getDeriveSamplesButton(getContainer(),null));
}
};
view.setShowDetailsColumn(false);
Expand Down Expand Up @@ -1247,7 +1249,7 @@ public VBox getView(ExpObjectForm form, BindException errors) throws Exception
}
}

if (getContainer().hasPermission(getUser(), InsertPermission.class))
if (getContainer().hasPermission(getUser(), InsertPermission.class) && OptionalFeatureService.get().isFeatureEnabled(AppProps.DEPRECATED_DERIVE_SAMPLES_NOT_IN_APP))
{
ActionURL deriveURL = new ActionURL(DeriveSamplesChooseTargetAction.class, getContainer());
deriveURL.addParameter("rowIds", _material.getRowId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import org.labkey.api.query.QuerySettings;
import org.labkey.api.query.QueryView;
import org.labkey.api.security.permissions.InsertPermission;
import org.labkey.api.settings.AppProps;
import org.labkey.api.settings.OptionalFeatureService;
import org.labkey.api.study.StudyUrls;
import org.labkey.api.study.publish.StudyPublishService;
import org.labkey.api.util.PageFlowUtil;
Expand Down Expand Up @@ -215,7 +217,8 @@ protected void populateButtonBar(DataView view, ButtonBar bar)
{
super.populateButtonBar(view, bar);

bar.add(getDeriveSamplesButton(getContainer(), _source.getRowId()));
if (OptionalFeatureService.get().isFeatureEnabled(AppProps.DEPRECATED_DERIVE_SAMPLES_NOT_IN_APP))
bar.add(getDeriveSamplesButton(getContainer(), _source.getRowId()));

ActionButton linkToStudyButton = getLinkToStudyButton(view);
if (linkToStudyButton != null)
Expand Down