few changes after testing.

revert-70aa11f8
ayyoob 7 years ago
parent 0d08c42f5e
commit f47d0deb1a

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.76-SNAPSHOT</version> <version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.76-SNAPSHOT</version> <version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -54,13 +54,13 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
@QueryParam("offset") int offset, @QueryParam("offset") int offset,
@QueryParam("limit") int limit) { @QueryParam("limit") int limit) {
RequestValidationUtil.validatePaginationParameters(offset, limit); RequestValidationUtil.validatePaginationParameters(offset, limit);
try {
int currentTenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); int currentTenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
if (MultitenantConstants.SUPER_TENANT_ID != currentTenantId) { if (MultitenantConstants.SUPER_TENANT_ID != currentTenantId) {
return Response.status(Response.Status.UNAUTHORIZED).entity( return Response.status(Response.Status.UNAUTHORIZED).entity(
new ErrorResponse.ErrorResponseBuilder().setMessage( new ErrorResponse.ErrorResponseBuilder().setMessage(
"Current logged in user is not authorized to perform this operation").build()).build(); "Current logged in user is not authorized to perform this operation").build()).build();
} }
try {
PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(DeviceMgtAPIUtils.getTenantId(tenantDomain)); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(DeviceMgtAPIUtils.getTenantId(tenantDomain));

@ -40,7 +40,7 @@ import java.util.List;
* &lt;element name="DeviceDetails" type="{}DeviceDetails"/> * &lt;element name="DeviceDetails" type="{}DeviceDetails"/>
* &lt;element name="Features" type="{}Features"/> * &lt;element name="Features" type="{}Features"/>
* &lt;element name="ProvisioningConfig" type="{}ProvisioningConfig"/> * &lt;element name="ProvisioningConfig" type="{}ProvisioningConfig"/>
* &lt;element name="PushNotificationProvider" type="{}PushNotificationProvider"/> * &lt;element name="PushNotificationProviderConfig" type="{}PushNotificationProviderConfig"/>
* &lt;element name="License" type="{}License"/> * &lt;element name="License" type="{}License"/>
* &lt;element name="DataSource" type="{}DataSource"/> * &lt;element name="DataSource" type="{}DataSource"/>
* &lt;element name="PolicyMonitoring" type="{}PolicyMonitoring"/> * &lt;element name="PolicyMonitoring" type="{}PolicyMonitoring"/>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>2.0.76-SNAPSHOT</version> <version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>2.0.76-SNAPSHOT</version> <version>3.0.0-SNAPSHOT</version>
<name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name> <name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description> <description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

Loading…
Cancel
Save