Changing permissions - /device-mgt/configurations to /device-mgt/platform-configurations

merge-requests/1/head
dilanua 8 years ago
parent 08c6ba0617
commit 19b6a334ad

@ -21,7 +21,6 @@ package org.wso2.carbon.mdm.services.android.services;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.api.Permission; import org.wso2.carbon.apimgt.annotations.api.Permission;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.mdm.services.android.bean.AndroidPlatformConfiguration; import org.wso2.carbon.mdm.services.android.bean.AndroidPlatformConfiguration;
import org.wso2.carbon.mdm.services.android.exception.AndroidAgentException; import org.wso2.carbon.mdm.services.android.exception.AndroidAgentException;
@ -82,7 +81,7 @@ public interface DeviceTypeConfigurationService {
code = 500, code = 500,
message = "Internal Server Error. \n Server error occurred while fetching Android platform configuration.") message = "Internal Server Error. \n Server error occurred while fetching Android platform configuration.")
}) })
@Permission(name = "View Configurations", permission = "/device-mgt/configurations/view") @Permission(name = "View Configurations", permission = "/device-mgt/platform-configurations/view")
Response getConfiguration( Response getConfiguration(
@ApiParam( @ApiParam(
name = "If-Modified-Since", name = "If-Modified-Since",
@ -132,7 +131,7 @@ public interface DeviceTypeConfigurationService {
message = "Internal Server Error. \n " + message = "Internal Server Error. \n " +
"Server error occurred while modifying Android platform configuration.") "Server error occurred while modifying Android platform configuration.")
}) })
@Permission(name = "Manage Configurations", permission = "/device-mgt/configurations/manage") @Permission(name = "Manage Configurations", permission = "/device-mgt/platform-configurations/manage")
Response updateConfiguration( Response updateConfiguration(
@ApiParam(name = "configuration", @ApiParam(name = "configuration",
value = "AndroidPlatformConfiguration") value = "AndroidPlatformConfiguration")

@ -50,7 +50,7 @@ function onRequest(context) {
permissions.LIST_ROLES = userModule.isAuthorized("/permission/admin/device-mgt/roles/view"); permissions.LIST_ROLES = userModule.isAuthorized("/permission/admin/device-mgt/roles/view");
permissions.LIST_USERS = userModule.isAuthorized("/permission/admin/device-mgt/users/view"); permissions.LIST_USERS = userModule.isAuthorized("/permission/admin/device-mgt/users/view");
permissions.LIST_NOTIFICATIONS = userModule.isAuthorized("/permission/admin/device-mgt/notifications/view"); permissions.LIST_NOTIFICATIONS = userModule.isAuthorized("/permission/admin/device-mgt/notifications/view");
permissions.LIST_CONFIGURATION = userModule.isAuthorized("/permission/admin/device-mgt/configurations/view"); permissions.LIST_CONFIGURATION = userModule.isAuthorized("/permission/admin/device-mgt/platform-configurations/view");
viewModel.permissions = permissions; viewModel.permissions = permissions;
viewModel["currentUser"] = currentUser; viewModel["currentUser"] = currentUser;
viewModel["appContext"] = mdmProps["appContext"]; viewModel["appContext"] = mdmProps["appContext"];

@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.mobile.windows.api.services;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.api.Permission; import org.wso2.carbon.apimgt.annotations.api.Permission;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
@ -52,7 +51,7 @@ public interface ConfigurationMgtService {
* @throws WindowsConfigurationException * @throws WindowsConfigurationException
*/ */
@POST @POST
@Permission(name = "Manage Configurations", permission = "/device-mgt/configurations/manage") @Permission(name = "Manage Configurations", permission = "/device-mgt/platform-configurations/manage")
Message ConfigureSettings(PlatformConfiguration configuration) throws WindowsConfigurationException; Message ConfigureSettings(PlatformConfiguration configuration) throws WindowsConfigurationException;
/** /**
@ -62,7 +61,7 @@ public interface ConfigurationMgtService {
* @throws WindowsConfigurationException * @throws WindowsConfigurationException
*/ */
@GET @GET
@Permission(name = "View Configurations", permission = "/device-mgt/configurations/view") @Permission(name = "View Configurations", permission = "/device-mgt/platform-configurations/view")
PlatformConfiguration getConfiguration() throws WindowsConfigurationException; PlatformConfiguration getConfiguration() throws WindowsConfigurationException;
/** /**
@ -73,6 +72,6 @@ public interface ConfigurationMgtService {
* @throws WindowsConfigurationException * @throws WindowsConfigurationException
*/ */
@PUT @PUT
@Permission(name = "Manage Configurations", permission = "/device-mgt/configurations/manage") @Permission(name = "Manage Configurations", permission = "/device-mgt/platform-configurations/manage")
Message updateConfiguration(PlatformConfiguration configuration) throws WindowsConfigurationException; Message updateConfiguration(PlatformConfiguration configuration) throws WindowsConfigurationException;
} }

Loading…
Cancel
Save