From da41e06797b5af29f71e1e59e3274a4361d13651 Mon Sep 17 00:00:00 2001 From: Ate Hempenius Date: Tue, 2 Jun 2026 16:09:57 +0200 Subject: [PATCH] public_model_functionality_fixes --- _alp/Agents/Zero_Interface/Code/Functions.java | 5 +++++ _alp/Agents/Zero_Interface/Levels/Level.level.xml | 2 +- _alp/Agents/Zero_Loader/Code/Functions.java | 2 +- _alp/Agents/tabEHub/Levels/Level.level.xml | 8 ++++---- _alp/ModelResources.xml | 8 ++++---- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/_alp/Agents/Zero_Interface/Code/Functions.java b/_alp/Agents/Zero_Interface/Code/Functions.java index bceaf9d..c7fe25a 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.java +++ b/_alp/Agents/Zero_Interface/Code/Functions.java @@ -437,6 +437,11 @@ else if (previousClickedObjectType == OL_GISObjectType.BUILDING || } List selectedChartTypes_Economic = settings.resultsUISelectedChartTypes_Economic(); +//Disable export functionality in profiles if not full access. +if(settings.isPublicModel() || user.GCAccessType != OL_UserGCAccessType.FULL){ + uI_Results.f_enablePublicVersion(true); +} + //Disable summary button if summary is not selected if(settings.showKPISummary() == null || !settings.showKPISummary()){ uI_Results.getCheckbox_KPISummary().setVisible(false); diff --git a/_alp/Agents/Zero_Interface/Levels/Level.level.xml b/_alp/Agents/Zero_Interface/Levels/Level.level.xml index 65b6d39..be478f5 100644 --- a/_alp/Agents/Zero_Interface/Levels/Level.level.xml +++ b/_alp/Agents/Zero_Interface/Levels/Level.level.xml @@ -2110,7 +2110,7 @@ gr_cablesLegend.setVisible(showCables); -16777216 cb_showFilterInterface.isEnabled() true - !settings.isPublicModel() && c_cbFilterOptions.size() > 0 + !settings.isPublicModel() && user.GCAccessType == OL_UserGCAccessType.FULL && c_cbFilterOptions.size() > 0 gr_filterInterface.setVisible(cb_showFilterInterface.isSelected()); if(!cb_showFilterInterface.isSelected()){ diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index 0244dda..834cfcd 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -4836,7 +4836,7 @@ boolean f_getAccessOfSurveyGC(boolean dataSharingAgreed,Uuid companyUUID) // If private model: several conditions allow access return user.GCAccessType == OL_UserGCAccessType.FULL || dataSharingAgreed || - user.accessibleCompanyIDs.contains(companyUUID.toString()); + (user.GCAccessType == OL_UserGCAccessType.SPECIFIED && user.accessibleCompanyIDs.contains(companyUUID.toString())); /*ALCODEEND*/} boolean f_isLocatedInActiveNBH(double lat,double lon) diff --git a/_alp/Agents/tabEHub/Levels/Level.level.xml b/_alp/Agents/tabEHub/Levels/Level.level.xml index 16d8be5..ab27606 100644 --- a/_alp/Agents/tabEHub/Levels/Level.level.xml +++ b/_alp/Agents/tabEHub/Levels/Level.level.xml @@ -114,7 +114,7 @@ -16777216 //!zero_Interface.settings.isPublicModel() true - !zero_Interface.settings.isPublicModel() + !zero_Interface.settings.isPublicModel() && zero_Interface.user.GCAccessType == OL_UserGCAccessType.FULL /* if (v_NFATOListener) { // This should not be reachable anymore @@ -176,7 +176,7 @@ else { false -16777216 !zero_Interface.settings.isPublicModel() - true + false for (GridConnection GC : zero_Interface.energyModel.f_getActiveGridConnections()) { GC.v_liveConnectionMetaData.clearSharedCapacityManagers(); } @@ -213,7 +213,7 @@ zero_Interface.f_resetSettings(); false -16777216 true - !zero_Interface.settings.isPublicModel() + !zero_Interface.settings.isPublicModel() && zero_Interface.user.GCAccessType == OL_UserGCAccessType.FULL zero_Interface.f_startEnergyHubConfiguration(); @@ -289,7 +289,7 @@ zero_Interface.f_resetSettings(); false -16777216 true - !zero_Interface.settings.isPublicModel() + !zero_Interface.settings.isPublicModel() && zero_Interface.user.GCAccessType == OL_UserGCAccessType.FULL // First check if there are any save files, if there are none we display an error screen zero_Interface.uI_EnergyHub.f_initializeUserSavedScenarios(zero_Interface.uI_EnergyHub.combobox_selectScenario); diff --git a/_alp/ModelResources.xml b/_alp/ModelResources.xml index 6fcb1f4..bd463f5 100644 --- a/_alp/ModelResources.xml +++ b/_alp/ModelResources.xml @@ -115,14 +115,14 @@ FILE_SYSTEM - 1776931922142 - vallum-production-861-41ea4ca-all.jar + 1777376766232 + icon_arrow.png false FILE_SYSTEM - 1777376766232 - icon_arrow.png + 1780401378047 + vallum-main-863-c779e37-all.jar false FILE_SYSTEM