From 3d0bbf0b1c8c46cdcf1dc8aee12ce5a9b7fd2c24 Mon Sep 17 00:00:00 2001 From: "tcdlpds@gmail.com" Date: Tue, 31 Mar 2020 02:04:51 +0530 Subject: [PATCH] Add an open endpoint to get UI config This API endpoint will be used to get app tags, scopes etc. These data will be used in proxy level when it creates access token. --- .../mgt/api/services/ConfigRetrieveAPI.java | 83 ---------- .../services/impl/ConfigRetrieveAPIImpl.java | 56 ------- .../src/main/webapp/WEB-INF/cxf-servlet.xml | 2 - .../mgt/common/services/AppmDataHandler.java | 7 - .../mgt/core/config/Configuration.java | 12 -- .../mgt/core/impl/AppmDataHandlerImpl.java | 11 +- ...ApplicationManagementServiceComponent.java | 5 +- .../src/test/resources/application-mgt.xml | 41 ----- .../repository/conf/application-mgt.xml | 41 ----- .../api/ConfigurationManagementService.java | 26 +++ .../impl/ConfigurationServiceImpl.java | 22 +++ .../src/main/webapp/WEB-INF/web.xml | 3 +- .../mgt/common/DeviceManagementConstants.java | 1 + .../DeviceManagementConfigRepository.java | 3 - .../DeviceManagementServiceComponent.java | 2 + .../mgt/ReportManagementServiceImpl.java | 2 - .../mgt/core/ui/config/AppRegistration.java | 47 ++++++ .../mgt/core/ui}/config/UIConfiguration.java | 20 +-- .../ui/config/UIConfigurationManager.java | 79 +++++++++ .../mgt/core/util/DeviceManagerUtil.java | 1 - .../ui/request/interceptor/LoginHandler.java | 10 +- .../interceptor/util/HandlerConstants.java | 2 +- .../main/resources/conf/application-mgt.xml | 145 ----------------- .../src/main/resources/conf/mdm-ui-config.xml | 153 ++++++++++++++++++ .../src/main/resources/p2.inf | 1 + 25 files changed, 351 insertions(+), 424 deletions(-) delete mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ConfigRetrieveAPI.java delete mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ConfigRetrieveAPIImpl.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/AppRegistration.java rename components/{application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common => device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui}/config/UIConfiguration.java (73%) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/UIConfigurationManager.java create mode 100644 features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ConfigRetrieveAPI.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ConfigRetrieveAPI.java deleted file mode 100644 index 51ea56ef63e..00000000000 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ConfigRetrieveAPI.java +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. - * - * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.application.mgt.api.services; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.Extension; -import io.swagger.annotations.ExtensionProperty; -import io.swagger.annotations.Info; -import io.swagger.annotations.SwaggerDefinition; -import org.wso2.carbon.device.application.mgt.common.*; -import org.wso2.carbon.device.application.mgt.common.ErrorResponse; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - -/** - * APIs to handle application management related tasks. - */ -@SwaggerDefinition( - info = @Info( - version = "1.0.0", - title = "Application Management Config Retrieve Service", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = "name", value = "ApplicationManagementConfigRetrieveService"), - @ExtensionProperty(name = "context", value = "/api/application-mgt/v1.0/config"), - }) - } - ) -) -@Path("/config") -@Api(value = "ApplicationDTO Management Common Service") -@Produces(MediaType.APPLICATION_JSON) -public interface ConfigRetrieveAPI { - - @GET - @Path("/ui-config") - @Produces(MediaType.APPLICATION_JSON) - @ApiOperation( - consumes = MediaType.APPLICATION_JSON, - produces = MediaType.APPLICATION_JSON, - httpMethod = "GET", - value = "get application management UI configuration", - notes = "This will get all UI configuration of application management" - ) - @ApiResponses( - value = { - @ApiResponse( - code = 200, - message = "OK. \n Successfully got UI config.", - response = ApplicationList.class), - @ApiResponse( - code = 404, - message = "Not Found. There doesn't have an defined UI config." + - "query."), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n Error occurred while getting the UI config.", - response = ErrorResponse.class) - }) - Response getUiConfig(); -} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ConfigRetrieveAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ConfigRetrieveAPIImpl.java deleted file mode 100644 index ef97a78db75..00000000000 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ConfigRetrieveAPIImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. - * - * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.device.application.mgt.api.services.impl; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.device.application.mgt.api.services.ConfigRetrieveAPI; -import org.wso2.carbon.device.application.mgt.common.config.UIConfiguration; -import org.wso2.carbon.device.application.mgt.common.services.AppmDataHandler; -import org.wso2.carbon.device.application.mgt.core.util.APIUtil; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Response; - -/** - * Implementation of ApplicationDTO Management related APIs. - */ -@Produces({"application/json"}) -@Path("/config") -public class ConfigRetrieveAPIImpl implements ConfigRetrieveAPI { - - private static Log log = LogFactory.getLog(ConfigRetrieveAPIImpl.class); - - @GET - @Override - @Consumes("application/json") - @Path("/ui-config") - public Response getUiConfig() { - AppmDataHandler dataHandler = APIUtil.getDataHandler(); - UIConfiguration uiConfiguration = dataHandler.getUIConfiguration(); - if (uiConfiguration == null){ - String msg = "UI configuration is not initiated."; - log.error(msg); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); - } - return Response.status(Response.Status.OK).entity(uiConfiguration).build(); - } -} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 6410fe84d0e..23d288898d0 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -25,7 +25,6 @@ - @@ -53,7 +52,6 @@ - diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/AppmDataHandler.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/AppmDataHandler.java index cfeaed58358..baf7fb9a2c5 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/AppmDataHandler.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/AppmDataHandler.java @@ -18,7 +18,6 @@ package org.wso2.carbon.device.application.mgt.common.services; import org.wso2.carbon.device.application.mgt.common.config.LifecycleState; -import org.wso2.carbon.device.application.mgt.common.config.UIConfiguration; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException; @@ -26,12 +25,6 @@ import java.io.InputStream; import java.util.Map; public interface AppmDataHandler { - /** - * Get UI configuration which is defined in the app-manager.xml - * - * @return {@link UIConfiguration} UI configuration - */ - UIConfiguration getUIConfiguration(); Map getLifecycleConfiguration() throws LifecycleManagementException; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java index 2aedcc3e664..3f3626bfb75 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java @@ -19,7 +19,6 @@ package org.wso2.carbon.device.application.mgt.core.config; import org.wso2.carbon.device.application.mgt.common.config.MDMConfig; import org.wso2.carbon.device.application.mgt.common.config.RatingConfiguration; -import org.wso2.carbon.device.application.mgt.common.config.UIConfiguration; import org.wso2.carbon.device.application.mgt.common.config.LifecycleState; import java.util.List; @@ -39,8 +38,6 @@ public class Configuration { private List lifecycleStates; - private UIConfiguration uiConfiguration; - private List appCategories; private RatingConfiguration ratingConfiguration; @@ -76,15 +73,6 @@ public class Configuration { this.lifecycleStates = lifecycleStates; } - @XmlElement(name = "UIConfigs") - public UIConfiguration getUiConfiguration() { - return uiConfiguration; - } - - public void setUiConfiguration(UIConfiguration uiConfiguration) { - this.uiConfiguration = uiConfiguration; - } - @XmlElement(name = "RatingConfig") public RatingConfiguration getRatingConfiguration() { return ratingConfiguration; } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/AppmDataHandlerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/AppmDataHandlerImpl.java index d77b13a9916..621b7c21690 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/AppmDataHandlerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/AppmDataHandlerImpl.java @@ -19,7 +19,6 @@ package org.wso2.carbon.device.application.mgt.core.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.application.mgt.common.config.LifecycleState; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationStorageManagementException; @@ -27,7 +26,6 @@ import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManageme import org.wso2.carbon.device.application.mgt.common.exception.RequestValidatingException; import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager; import org.wso2.carbon.device.application.mgt.common.services.AppmDataHandler; -import org.wso2.carbon.device.application.mgt.common.config.UIConfiguration; import org.wso2.carbon.device.application.mgt.core.dao.ApplicationReleaseDAO; import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory; import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException; @@ -44,19 +42,12 @@ import java.util.Map; public class AppmDataHandlerImpl implements AppmDataHandler { private static final Log log = LogFactory.getLog(AppmDataHandlerImpl.class); - private UIConfiguration uiConfiguration; private LifecycleStateManager lifecycleStateManager; - public AppmDataHandlerImpl(UIConfiguration config) { - this.uiConfiguration = config; + public AppmDataHandlerImpl() { lifecycleStateManager = DataHolder.getInstance().getLifecycleStateManager(); } - @Override - public UIConfiguration getUIConfiguration() { - return this.uiConfiguration; - } - @Override public Map getLifecycleConfiguration() throws LifecycleManagementException { return lifecycleStateManager.getLifecycleConfig(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ApplicationManagementServiceComponent.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ApplicationManagementServiceComponent.java index 4189e2ec7ce..7f07edba77a 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ApplicationManagementServiceComponent.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ApplicationManagementServiceComponent.java @@ -22,7 +22,6 @@ import org.apache.commons.logging.LogFactory; import org.osgi.framework.BundleContext; import org.osgi.service.component.ComponentContext; import org.wso2.carbon.device.application.mgt.common.config.LifecycleState; -import org.wso2.carbon.device.application.mgt.common.config.UIConfiguration; import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager; import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager; import org.wso2.carbon.device.application.mgt.common.services.AppmDataHandler; @@ -108,9 +107,7 @@ public class ApplicationManagementServiceComponent { DataHolder.getInstance().setApplicationStorageManager(applicationStorageManager); bundleContext.registerService(ApplicationStorageManager.class.getName(), applicationStorageManager, null); - UIConfiguration uiConfiguration = ConfigurationManager.getInstance(). - getConfiguration().getUiConfiguration(); - AppmDataHandler configManager = new AppmDataHandlerImpl(uiConfiguration); + AppmDataHandler configManager = new AppmDataHandlerImpl(); DataHolder.getInstance().setConfigManager(configManager); bundleContext.registerService(AppmDataHandler.class.getName(), configManager, null); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/application-mgt.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/application-mgt.xml index 8d447c93270..60a8b0448b9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/application-mgt.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/application-mgt.xml @@ -132,47 +132,6 @@ - - true - false - - - application_management - device_management - subscription_management - review_management - - true - - - perm:app:review:view - perm:app:review:update - perm:app:publisher:view - perm:app:publisher:update - perm:app:store:view - perm:app:subscription:install - perm:app:subscription:uninstall - perm:admin:app:review:update - perm:admin:app:review:view - perm:admin:app:publisher:update - perm:admin:app:review:update - - - app-mgt - - - /pages/error/client-errors/400 - /pages/error/client-errors/401 - /pages/error/client-errors/403 - /pages/error/client-errors/404 - /pages/error/client-errors/405 - /pages/error/client-errors/406 - /pages/error/client-errors/415 - /pages/error/server-errors/500 - /pages/error/default - - - EMM IoT diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml index 37c7a0a1d71..a94190bda4a 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml @@ -132,47 +132,6 @@ - - true - false - - - application_management - device_management - subscription_management - review_management - - true - - - perm:app:review:view - perm:app:review:update - perm:app:publisher:view - perm:app:publisher:update - perm:app:store:view - perm:app:subscription:install - perm:app:subscription:uninstall - perm:admin:app:review:update - perm:admin:app:review:view - perm:admin:app:publisher:update - perm:admin:app:review:update - - - app-mgt - - - /pages/error/client-errors/400 - /pages/error/client-errors/401 - /pages/error/client-errors/403 - /pages/error/client-errors/404 - /pages/error/client-errors/405 - /pages/error/client-errors/406 - /pages/error/client-errors/415 - /pages/error/server-errors/500 - /pages/error/default - - - EMM IoT diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ConfigurationManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ConfigurationManagementService.java index 9a739196169..868ae6f1694 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ConfigurationManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ConfigurationManagementService.java @@ -192,4 +192,30 @@ public interface ConfigurationManagementService { required = true) PlatformConfiguration configuration); + @GET + @Path("/ui-config") + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + produces = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "get application management UI configuration", + notes = "This will get all UI configuration of application management" + ) + @ApiResponses( + value = { + @ApiResponse( + code = 200, + message = "OK. \n Successfully got UI config."), + @ApiResponse( + code = 404, + message = "Not Found. There doesn't have an defined UI config." + + "query."), + @ApiResponse( + code = 500, + message = "Internal Server Error. \n Error occurred while getting the UI config.", + response = ErrorResponse.class) + }) + Response getUiConfig(); + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java index 1e176c623b3..8da23eba105 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java @@ -23,6 +23,8 @@ import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; +import org.wso2.carbon.device.mgt.core.ui.config.UIConfiguration; +import org.wso2.carbon.device.mgt.core.ui.config.UIConfigurationManager; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; import org.wso2.carbon.device.mgt.jaxrs.service.api.ConfigurationManagementService; import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil; @@ -31,6 +33,7 @@ import org.wso2.carbon.device.mgt.common.MDMAppConstants; import org.wso2.carbon.policy.mgt.common.PolicyManagementException; import org.wso2.carbon.policy.mgt.core.util.PolicyManagerUtil; +import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.HeaderParam; import javax.ws.rs.PUT; @@ -91,4 +94,23 @@ public class ConfigurationServiceImpl implements ConfigurationManagementService } } + @GET + @Override + @Consumes("application/json") + @Path("/ui-config") + public Response getUiConfig() { + UIConfigurationManager uiConfigurationManager = UIConfigurationManager.getInstance(); + if (uiConfigurationManager == null) { + String msg = "IoTS UI configuration manager is not initialized."; + log.error(msg); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); + } + UIConfiguration uiConfiguration = uiConfigurationManager.getUIConfig(); + if (uiConfiguration == null) { + String msg = "IoTS UI configuration is not defined."; + log.error(msg); + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); + } + return Response.status(Response.Status.OK).entity(uiConfiguration).build(); + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/web.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/web.xml index fffbfbdb24e..4c08378ea63 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/web.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/WEB-INF/web.xml @@ -48,7 +48,8 @@ nonSecuredEndPoints - /api/device-mgt/v1.0/users/validate + /api/device-mgt/v1.0/users/validate, + /api/device-mgt/v1.0/configuration/ui-config diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java index f826aacb5f8..20b4f5b626c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceManagementConstants.java @@ -27,6 +27,7 @@ public final class DeviceManagementConstants { public static final String DB_CHECK_QUERY = "SELECT * FROM DM_DEVICE"; public static final String SECURE_VAULT_NS = "http://org.wso2.securevault/configuration"; public static final String DEVICE_CONFIG_XML_NAME = "cdm-config.xml"; + public static final String UI_CONFIG_XML_NAME = "mdm-ui-config.xml"; } public static final class SecureValueProperties { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceManagementConfigRepository.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceManagementConfigRepository.java index 919865040a7..d51e7a4b979 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceManagementConfigRepository.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/DeviceManagementConfigRepository.java @@ -18,9 +18,6 @@ package org.wso2.carbon.device.mgt.core.config; import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig; -import org.wso2.carbon.device.mgt.core.config.identity.IdentityConfigurations; -import org.wso2.carbon.device.mgt.core.config.policy.PolicyConfiguration; -import org.wso2.carbon.device.mgt.core.config.task.TaskConfiguration; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java index 508507e79ba..101afac621d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java @@ -66,6 +66,7 @@ import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceIm import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceImpl; import org.wso2.carbon.device.mgt.core.task.DeviceTaskManagerService; +import org.wso2.carbon.device.mgt.core.ui.config.UIConfigurationManager; import org.wso2.carbon.device.mgt.core.util.DeviceManagementSchemaInitializer; import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; import org.wso2.carbon.email.sender.core.service.EmailSenderService; @@ -161,6 +162,7 @@ public class DeviceManagementServiceComponent { } /* Initializing Device Management Configuration */ DeviceConfigurationManager.getInstance().initConfig(); + UIConfigurationManager.getInstance().initConfig(); DeviceManagementConfig config = DeviceConfigurationManager.getInstance().getDeviceManagementConfig(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/report/mgt/ReportManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/report/mgt/ReportManagementServiceImpl.java index ce63ff965d7..620997f091f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/report/mgt/ReportManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/report/mgt/ReportManagementServiceImpl.java @@ -23,8 +23,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.Count; import org.wso2.carbon.device.mgt.common.Device; -import org.wso2.carbon.device.mgt.common.app.mgt.Application; -import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; import org.wso2.carbon.device.mgt.common.exceptions.BadRequestException; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.common.PaginationRequest; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/AppRegistration.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/AppRegistration.java new file mode 100644 index 00000000000..2f3bc6f08f3 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/AppRegistration.java @@ -0,0 +1,47 @@ +/* Copyright (c) 2020, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.wso2.carbon.device.mgt.core.ui.config; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import java.util.List; + +public class AppRegistration { + + private List tags; + private boolean isAllowToAllDomains; + + @XmlElementWrapper(name = "Tags") + @XmlElement(name = "Tag") + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + @XmlElement(name = "AllowToAllDomains") + public boolean isAllowToAllDomains() { + return isAllowToAllDomains; + } + + public void setAllowToAllDomains(boolean allowToAllDomains) { + isAllowToAllDomains = allowToAllDomains; + } + +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/UIConfiguration.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/UIConfiguration.java similarity index 73% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/UIConfiguration.java rename to components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/UIConfiguration.java index fc2726dabfd..1abeafd35d5 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/UIConfiguration.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/UIConfiguration.java @@ -1,11 +1,12 @@ -/* Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. +/* + * Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved. * - * Entgra (Pvt) Ltd. licenses this file to you under the Apache License, + * Entgra (pvt) Ltd. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -14,18 +15,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.wso2.carbon.device.application.mgt.common.config; +package org.wso2.carbon.device.mgt.core.ui.config; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; import java.util.List; +/** + * Represents the Application Management Configuration. + */ +@XmlRootElement(name = "UIConfiguration") public class UIConfiguration { private AppRegistration appRegistration; private List scopes; private boolean isSsoEnable; - private ErrorCallback errorCallback; @XmlElement(name = "AppRegistration", required=true) public AppRegistration getAppRegistration() { @@ -54,9 +59,4 @@ public class UIConfiguration { public void setSsoEnable(boolean ssoEnable) { isSsoEnable = ssoEnable; } - - @XmlElement(name = "ErrorCallback", required=true) - public ErrorCallback getErrorCallback() { return errorCallback; } - - public void setErrorCallback(ErrorCallback errorCallback) { this.errorCallback = errorCallback; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/UIConfigurationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/UIConfigurationManager.java new file mode 100644 index 00000000000..6053f092218 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/ui/config/UIConfigurationManager.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.core.ui.config; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; +import org.wso2.carbon.device.mgt.common.DeviceManagementConstants; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; +import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; +import org.wso2.carbon.utils.CarbonUtils; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import java.io.File; + +/** + * Class responsible for the UI configuration initialization. + */ +public class UIConfigurationManager { + + private static final Log log = LogFactory.getLog(UIConfigurationManager.class); + private UIConfiguration currentUIConfiguration; + private static UIConfigurationManager uiConfigurationManager; + private static final String UI_CONFIG_PATH = CarbonUtils.getCarbonConfigDirPath() + File.separator + + DeviceManagementConstants.DataSourceProperties.UI_CONFIG_XML_NAME; + + public static UIConfigurationManager getInstance() { + if (uiConfigurationManager == null) { + synchronized (UIConfigurationManager.class) { + if (uiConfigurationManager == null) { + uiConfigurationManager = new UIConfigurationManager(); + } + } + } + return uiConfigurationManager; + } + + public synchronized void initConfig(String configLocation) throws DeviceManagementException { + try { + File uiConfig = new File(configLocation); + Document doc = DeviceManagerUtil.convertToDocument(uiConfig); + + /* Un-marshaling UI configuration */ + JAXBContext cdmContext = JAXBContext.newInstance(UIConfiguration.class); + Unmarshaller unmarshaller = cdmContext.createUnmarshaller(); + this.currentUIConfiguration = (UIConfiguration) unmarshaller.unmarshal(doc); + } catch (JAXBException e) { + String msg = "Error occurred while initializing UI config"; + log.error(msg, e); + throw new DeviceManagementException(msg, e); + } + } + + public void initConfig() throws DeviceManagementException { + this.initConfig(UI_CONFIG_PATH); + } + + public UIConfiguration getUIConfig() { + return currentUIConfiguration; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java index 5ed3470c5c8..8ed75b6ac38 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java @@ -57,7 +57,6 @@ import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig; import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig; import org.wso2.carbon.device.mgt.core.config.datasource.JNDILookupDefinition; -import org.wso2.carbon.device.mgt.core.config.policy.PolicyConfiguration; import org.wso2.carbon.device.mgt.core.config.tenant.PlatformConfigurationManagementServiceImpl; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/LoginHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/LoginHandler.java index 3d31ed06ba9..93fa173f07f 100644 --- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/LoginHandler.java +++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/LoginHandler.java @@ -221,16 +221,16 @@ public class LoginHandler extends HttpServlet { * Define username and password static parameters. */ private static void validateLoginRequest(HttpServletRequest req) throws LoginException { - String gatewayCarbonPort = System.getProperty("iot.gateway.carbon.https.port"); - if (HandlerConstants.HTTP_PROTOCOL.equals(req.getScheme())){ - gatewayCarbonPort = System.getProperty("iot.gateway.carbon.http.port"); + String gatewayCarbonPort = System.getProperty("iot.core.https.port"); + if (HandlerConstants.HTTP_PROTOCOL.equals(req.getScheme())) { + gatewayCarbonPort = System.getProperty("iot.core.http.port"); } username = req.getParameter("username"); password = req.getParameter("password"); gatewayUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty("iot.gateway.host") + HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme()); - uiConfigUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + req.getServerName() + HandlerConstants.COLON - + gatewayCarbonPort + HandlerConstants.UI_CONFIG_ENDPOINT; + uiConfigUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty("iot.core.host") + + HandlerConstants.COLON + gatewayCarbonPort + HandlerConstants.UI_CONFIG_ENDPOINT; if (username == null || password == null) { String msg = "Invalid login request. Username or Password is not received for login request."; log.error(msg); diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java index f05655ed543..7cb242ff767 100644 --- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java +++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java @@ -21,7 +21,7 @@ package io.entgra.ui.request.interceptor.util; public class HandlerConstants { public static final String PUBLISHER_APPLICATION_NAME = "application-mgt-publisher"; public static final String APP_REG_ENDPOINT = "/api-application-registration/register"; - public static final String UI_CONFIG_ENDPOINT = "/api/application-mgt/v1.0/config/ui-config"; + public static final String UI_CONFIG_ENDPOINT = "/api/device-mgt/v1.0/configuration/ui-config"; public static final String TOKEN_ENDPOINT = "/token"; public static final String INTROSPECT_ENDPOINT = "/oauth2/introspect"; public static final String LOGIN_PAGE = "/login"; diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml index e8375b32ad6..d0d02a058a3 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml @@ -132,151 +132,6 @@ - - true - false - - - application_management - device_management - subscription_management - review_management - - true - - - perm:app:review:view - perm:app:review:update - perm:app:publisher:view - perm:app:publisher:update - perm:app:store:view - perm:app:subscription:install - perm:app:subscription:uninstall - perm:admin:app:review:update - perm:admin:app:review:view - perm:admin:app:publisher:update - perm:admin:app:review:update - perm:admin:app:subscription:view - perm:device-types:types - perm:enterprise:modify - perm:enterprise:view - perm:android-work:customer - perm:android-work:admin - perm:application-command:modify - perm:sign-csr - perm:admin:devices:view - perm:admin:topics:view - perm:roles:add - perm:roles:add-users - perm:roles:update - perm:roles:permissions - perm:roles:details - perm:roles:view - perm:roles:create-combined-role - perm:roles:delete - perm:dashboard:vulnerabilities - perm:dashboard:non-compliant-count - perm:dashboard:non-compliant - perm:dashboard:by-groups - perm:dashboard:device-counts - perm:dashboard:feature-non-compliant - perm:dashboard:count-overview - perm:dashboard:filtered-count - perm:dashboard:details - perm:get-activity - perm:devices:delete - perm:devices:applications - perm:devices:effective-policy - perm:devices:compliance-data - perm:devices:features - perm:devices:operations - perm:devices:search - perm:devices:details - perm:devices:update - perm:devices:view - perm:view-configuration - perm:manage-configuration - perm:policies:remove - perm:policies:priorities - perm:policies:deactivate - perm:policies:get-policy-details - perm:policies:manage - perm:policies:activate - perm:policies:update - perm:policies:changes - perm:policies:get-details - perm:users:add - perm:users:details - perm:users:count - perm:users:delete - perm:users:roles - perm:users:user-details - perm:users:credentials - perm:users:search - perm:users:is-exist - perm:users:update - perm:users:send-invitation - perm:admin-users:view - perm:admin:devices:update-enrollment - perm:groups:devices - perm:groups:update - perm:groups:add - perm:groups:device - perm:groups:devices-count - perm:groups:remove - perm:groups:groups - perm:groups:groups-view - perm:groups:share - perm:groups:count - perm:groups:roles - perm:groups:devices-remove - perm:groups:devices-add - perm:groups:assign - perm:device-types:configs - perm:device-types:features - perm:device-types:types - perm:applications:install - perm:applications:uninstall - perm:admin-groups:count - perm:admin-groups:view - perm:notifications:mark-checked - perm:notifications:view - perm:admin:certificates:delete - perm:admin:certificates:details - perm:admin:certificates:view - perm:admin:certificates:add - perm:admin:certificates:verify - perm:admin - perm:devicetype:deployment - perm:device-types:events - perm:device-types:events:view - perm:admin:device-type - perm:admin:device-type:view - perm:admin:device-type:configs - perm:device:enroll - perm:geo-service:analytics-view - perm:geo-service:alerts-manage - appm:read - perm:devices:permanent-delete - perm:android:manage-configuration - perm:android:view-configuration - - - app-mgt - - - /pages/error/client-errors/400 - /pages/error/client-errors/401 - /pages/error/client-errors/403 - /pages/error/client-errors/404 - /pages/error/client-errors/405 - /pages/error/client-errors/406 - /pages/error/client-errors/415 - /pages/error/server-errors/500 - /pages/error/default - - - EMM IoT diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml new file mode 100644 index 00000000000..ff0753ee1f5 --- /dev/null +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml @@ -0,0 +1,153 @@ + + + + + true + false + + + application_management + device_management + subscription_management + review_management + + true + + + perm:app:review:view + perm:app:review:update + perm:app:publisher:view + perm:app:publisher:update + perm:app:store:view + perm:app:subscription:install + perm:app:subscription:uninstall + perm:admin:app:review:update + perm:admin:app:review:view + perm:admin:app:publisher:update + perm:admin:app:review:update + perm:admin:app:subscription:view + perm:device-types:types + perm:enterprise:modify + perm:enterprise:view + perm:android-work:customer + perm:android-work:admin + perm:application-command:modify + perm:sign-csr + perm:admin:devices:view + perm:admin:topics:view + perm:roles:add + perm:roles:add-users + perm:roles:update + perm:roles:permissions + perm:roles:details + perm:roles:view + perm:roles:create-combined-role + perm:roles:delete + perm:dashboard:vulnerabilities + perm:dashboard:non-compliant-count + perm:dashboard:non-compliant + perm:dashboard:by-groups + perm:dashboard:device-counts + perm:dashboard:feature-non-compliant + perm:dashboard:count-overview + perm:dashboard:filtered-count + perm:dashboard:details + perm:get-activity + perm:devices:delete + perm:devices:applications + perm:devices:effective-policy + perm:devices:compliance-data + perm:devices:features + perm:devices:operations + perm:devices:search + perm:devices:details + perm:devices:update + perm:devices:view + perm:view-configuration + perm:manage-configuration + perm:policies:remove + perm:policies:priorities + perm:policies:deactivate + perm:policies:get-policy-details + perm:policies:manage + perm:policies:activate + perm:policies:update + perm:policies:changes + perm:policies:get-details + perm:users:add + perm:users:details + perm:users:count + perm:users:delete + perm:users:roles + perm:users:user-details + perm:users:credentials + perm:users:search + perm:users:is-exist + perm:users:update + perm:users:send-invitation + perm:admin-users:view + perm:admin:devices:update-enrollment + perm:groups:devices + perm:groups:update + perm:groups:add + perm:groups:device + perm:groups:devices-count + perm:groups:remove + perm:groups:groups + perm:groups:groups-view + perm:groups:share + perm:groups:count + perm:groups:roles + perm:groups:devices-remove + perm:groups:devices-add + perm:groups:assign + perm:device-types:configs + perm:device-types:features + perm:device-types:types + perm:applications:install + perm:applications:uninstall + perm:admin-groups:count + perm:admin-groups:view + perm:notifications:mark-checked + perm:notifications:view + perm:admin:certificates:delete + perm:admin:certificates:details + perm:admin:certificates:view + perm:admin:certificates:add + perm:admin:certificates:verify + perm:admin + perm:devicetype:deployment + perm:device-types:events + perm:device-types:events:view + perm:admin:device-type + perm:admin:device-type:view + perm:admin:device-type:configs + perm:device:enroll + perm:geo-service:analytics-view + perm:geo-service:alerts-manage + appm:read + perm:devices:permanent-delete + perm:android:manage-configuration + perm:android:view-configuration + + + device-mgt + + + diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf index 5d3e074f760..09ec420214c 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf @@ -1,5 +1,6 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/cdm-config.xml,target:${installFolder}/../../conf/cdm-config.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/mdm-ui-config.xml,target:${installFolder}/../../conf/mdm-ui-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/license-config.xml,target:${installFolder}/../../conf/etc/license-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/remote-appmanager-config.xml,target:${installFolder}/../../conf/etc/remote-appmanager-config.xml,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/dbscripts/cdm,target:${installFolder}/../../../dbscripts/cdm,overwrite:true);\