From 2cc9a50b9243709218c3377c63b6163b29e2c478 Mon Sep 17 00:00:00 2001 From: hasuniea Date: Wed, 28 Sep 2016 14:27:16 +0530 Subject: [PATCH] adding permission for windows enrollment --- .../mobile/windows/api/services/ConfigurationMgtService.java | 1 + .../mgt/mobile/windows/api/services/authbst/BSTProvider.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java index 10f731b15..208a667a0 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java @@ -183,6 +183,7 @@ public interface ConfigurationMgtService { code = 500, message = "Internal Server Error. \n Server error occurred while fetching Windows license configuration.") }) + @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/windows") Response getLicense( @ApiParam( name = "If-Modified-Since", diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/authbst/BSTProvider.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/authbst/BSTProvider.java index 140ba6c00..220d0e02d 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/authbst/BSTProvider.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/authbst/BSTProvider.java @@ -18,6 +18,7 @@ package org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst; +import org.wso2.carbon.apimgt.annotations.api.Permission; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.beans.Credentials; @@ -36,5 +37,6 @@ public interface BSTProvider { @POST @Consumes(MediaType.APPLICATION_JSON) @Path("/authentication") + @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/windows") Response getBST(Credentials credentials) throws WindowsDeviceEnrolmentException; }