100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Fix with public access read for consoles
Michael Rademakerc52bd01e63e1
diff --git a/manager/src/main/java/org/openremote/manager/asset/console/ConsoleResourceImpl.java b/manager/src/main/java/org/openremote/manager/asset/console/ConsoleResourceImpl.javaindex bb496364b..aa47d1028 100644--- a/manager/src/main/java/org/openremote/manager/asset/console/ConsoleResourceImpl.java+++ b/manager/src/main/java/org/openremote/manager/asset/console/ConsoleResourceImpl.java@@ -80,7 +80,7 @@ public class ConsoleResourceImpl extends ManagerWebResource implements ConsoleReconsoleRegistration.getVersion(),consoleRegistration.getPlatform(),consoleRegistration.getProviders(),- !isAuthenticated(),+ true,true);consoleAsset.setRealmId(getRequestTenant().getId());diff --git a/manager/src/main/java/org/openremote/manager/notification/NotificationResourceImpl.java b/manager/src/main/java/org/openremote/manager/notification/NotificationResourceImpl.javaindex 833666704..3087df016 100644--- a/manager/src/main/java/org/openremote/manager/notification/NotificationResourceImpl.java+++ b/manager/src/main/java/org/openremote/manager/notification/NotificationResourceImpl.java@@ -183,10 +183,12 @@ public class NotificationResourceImpl extends WebResource implements NotificatioLOG.fine("DENIED: Anonymous request to update a notification sent to an asset that doesn't exist or isn't public");throw new WebApplicationException("Anonymous request can only update public assets not linked to a user", FORBIDDEN);}- if (assetStorageService.isUserAsset(asset.getId())) {- LOG.fine("DENIED: Anonymous request to update a notification sent to an asset that is linked to one or more users");- throw new WebApplicationException("Anonymous request can only update public assets not linked to a user", FORBIDDEN);- }++ // Disabled until console permissions finalised+// if (assetStorageService.isUserAsset(asset.getId())) {+// LOG.fine("DENIED: Anonymous request to update a notification sent to an asset that is linked to one or more users");+// throw new WebApplicationException("Anonymous request can only update public assets not linked to a user", FORBIDDEN);+// }} else {// Regular users can only update notifications sent to them or assets in their realm// Restricted users can only update notifications sent to them or assets linked to themdiff --git a/model/src/main/java/org/openremote/model/console/ConsoleConfiguration.java b/model/src/main/java/org/openremote/model/console/ConsoleConfiguration.javaindex 609d20aac..f2e7ded0d 100644--- a/model/src/main/java/org/openremote/model/console/ConsoleConfiguration.java+++ b/model/src/main/java/org/openremote/model/console/ConsoleConfiguration.java@@ -69,6 +69,8 @@ public final class ConsoleConfiguration {setConsolePlatform(asset, platform);setConsolProviders(asset, providerMap);+ asset.setAccessPublicRead(true);+Meta locationMeta = new Meta(new MetaItem(RULE_STATE));if (allowPublicLocationWrite) {locationMeta.add(new MetaItem(ACCESS_PUBLIC_WRITE));