Please note that * sign represents required fields of data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Certificate was added successfully.
+
+ Please click "Add Another Certificate", if you wish to add another certificate or
+ click
+ "View Certificate List" to complete the process and go back to the certificate list.
+
+
+
+
+
+
+
+ Add Another Certificate
+
+
+
+
+
+
+
+{{/zone}}
+
+{{#zone "bottomJs"}}
+ {{js "/js/certificate-create.js"}}
+{{/zone}}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/create.js
new file mode 100644
index 0000000000..4e7585163a
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/create.js
@@ -0,0 +1,45 @@
+/*
+ Copyright (c) 2016, 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.
+ */
+
+/**
+ * Returns the dynamic state to be populated by add-user page.
+ *
+ * @param context Object that gets updated with the dynamic state of this page to be presented
+ * @returns {*} A context object that returns the dynamic state of this page to be presented
+ */
+function onRequest(context) {
+ // var log = new Log("units/user-create/create.js");
+ var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
+ var mdmProps = require("/app/modules/conf-reader/main.js")["conf"];
+
+ var response = userModule.getRolesByUserStore();
+ if (response["status"] == "success") {
+ context["roles"] = response["content"];
+ }
+
+ context["charLimit"] = mdmProps["usernameLength"];
+ context["usernameJSRegEx"] = mdmProps["userValidationConfig"]["usernameJSRegEx"];
+ context["usernameHelpText"] = mdmProps["userValidationConfig"]["usernameHelpMsg"];
+ context["usernameRegExViolationErrorMsg"] = mdmProps["userValidationConfig"]["usernameRegExViolationErrorMsg"];
+ context["firstnameJSRegEx"] = mdmProps["userValidationConfig"]["firstnameJSRegEx"];
+ context["firstnameRegExViolationErrorMsg"] = mdmProps["userValidationConfig"]["firstnameRegExViolationErrorMsg"];
+ context["lastnameJSRegEx"] = mdmProps["userValidationConfig"]["lastnameJSRegEx"];
+ context["lastnameRegExViolationErrorMsg"] = mdmProps["userValidationConfig"]["lastnameRegExViolationErrorMsg"];
+
+ return context;
+}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/create.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/create.json
new file mode 100644
index 0000000000..db293d5ab1
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/create.json
@@ -0,0 +1,5 @@
+{
+ "version": "1.0.0",
+ "uri": "/certificates/add",
+ "layout": "cdmf.layout.default"
+}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/public/js/certificate-create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/public/js/certificate-create.js
new file mode 100644
index 0000000000..4ccd72a11f
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificate.create/public/js/certificate-create.js
@@ -0,0 +1,129 @@
+/*
+ Copyright (c) 2016, 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.
+ */
+var pemContent = "";
+var errorMsgWrapper = "#certificate-create-error-msg";
+var errorMsg = "#certificate-create-error-msg span";
+var validateInline = {};
+var clearInline = {};
+
+var base_api_url = "/api/certificate-mgt/v1.0";
+
+var enableInlineError = function (inputField, errorMsg, errorSign) {
+ var fieldIdentifier = "#" + inputField;
+ var errorMsgIdentifier = "#" + inputField + " ." + errorMsg;
+ var errorSignIdentifier = "#" + inputField + " ." + errorSign;
+
+ if (inputField) {
+ $(fieldIdentifier).addClass(" has-error has-feedback");
+ }
+
+ if (errorMsg) {
+ $(errorMsgIdentifier).removeClass(" hidden");
+ }
+
+ if (errorSign) {
+ $(errorSignIdentifier).removeClass(" hidden");
+ }
+};
+
+var disableInlineError = function (inputField, errorMsg, errorSign) {
+ var fieldIdentifier = "#" + inputField;
+ var errorMsgIdentifier = "#" + inputField + " ." + errorMsg;
+ var errorSignIdentifier = "#" + inputField + " ." + errorSign;
+
+ if (inputField) {
+ $(fieldIdentifier).removeClass(" has-error has-feedback");
+ }
+
+ if (errorMsg) {
+ $(errorMsgIdentifier).addClass(" hidden");
+ }
+
+ if (errorSign) {
+ $(errorSignIdentifier).addClass(" hidden");
+ }
+};
+
+function readSingleFile(evt) {
+ var f = evt.target.files[0];
+ if (f) {
+ var r = new FileReader();
+ r.onload = function (e) {
+ var contents = e.target.result;
+ if (f.type == "application/x-x509-ca-cert") {
+ pemContent = contents;
+ console.log(contents);
+ console.log(pemContent);
+ pemContent = pemContent.substring(28, pemContent.length - 27);
+ console.log(pemContent);
+ $(errorMsgWrapper).addClass("hidden");
+ } else {
+ $(errorMsg).text("Certificate must be a .pem file containing a valid certificate data.");
+ $(errorMsgWrapper).removeClass("hidden");
+ }
+ }
+ r.readAsText(f);
+ } else {
+ //inline error
+ }
+}
+
+$(document).ready(function () {
+ pemContent = "";
+ document.getElementById('certificate').addEventListener('change', readSingleFile, false);
+
+ /**
+ * Following click function would execute
+ * when a user clicks on "Add Certificate" button.
+ */
+ $("button#add-certificate-btn").click(function () {
+ var serialNoInput = $("input#serialNo");
+ var serialNo = serialNoInput.val();
+ if (!serialNo) {
+ $(errorMsg).text("Serial Number is a required field. It cannot be empty.");
+ $(errorMsgWrapper).removeClass("hidden");
+ } else if (!pemContent) {
+ $(errorMsg).text(" .pem file must contains certificate information.");
+ $(errorMsgWrapper).removeClass("hidden");
+ } else {
+ var addCertificateFormData = {};
+ addCertificateFormData.serial = serialNo;
+ addCertificateFormData.pem = pemContent;
+ var certificateList = [];
+ certificateList.push(addCertificateFormData);
+
+ var serviceUrl = base_api_url + "/admin/certificates";
+ invokerUtil.post(
+ serviceUrl,
+ certificateList,
+ function (data) {
+ // Refreshing with success message
+ $("#certificate-create-form").addClass("hidden");
+ $("#certificate-created-msg").removeClass("hidden");
+ }, function (data) {
+ if (data["status"] == 500) {
+ $(errorMsg).text("An unexpected error occurred at backend server. Please try again later.");
+ } else {
+ $(errorMsg).text(data);
+ }
+ $(errorMsgWrapper).removeClass("hidden");
+ }
+ );
+ }
+ });
+});
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/certificates.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/certificates.hbs
new file mode 100644
index 0000000000..86f161ae35
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/certificates.hbs
@@ -0,0 +1,177 @@
+{{!
+ Copyright (c) 2016, 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.
+}}
+{{unit "cdmf.unit.ui.title" pageTitle="Add Certificate"}}
+
+{{#zone "breadcrumbs"}}
+
+
+{{/each}}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js
index ec98554ce1..06ac10ba3a 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.js
@@ -16,25 +16,25 @@
* under the License.
*/
-function onRequest(context) {
+function onRequest() {
var constants = require("/app/modules/constants.js");
- var user = session.get(constants.USER_SESSION_KEY);
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
- var permissions = userModule.getUIPermissions();
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
+ var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
+ var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"];
+ var policyModule = require("/app/modules/business-controllers/policy.js")["policyModule"];
+
+ var user = session.get(constants["USER_SESSION_KEY"]);
+ var permissions = userModule.getUIPermissions();
if (!permissions.VIEW_DASHBOARD) {
- response.sendRedirect(constants.WEB_APP_CONTEXT + "/devices");
+ response.sendRedirect(devicemgtProps["appContext"] + "devices");
return;
}
var page = {};
page.permissions = permissions;
page.enrollmentURL = devicemgtProps.enrollmentURL;
- var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
- var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"];
- var policyModule = require("/app/modules/business-controllers/policy.js")["policyModule"];
-
page.device_count = deviceModule.getDevicesCount();
page.group_count = groupModule.getGroupCount();
page.user_count = userModule.getUsers()["content"].length;
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/js/bottomJs.js
new file mode 100644
index 0000000000..0dc9a79602
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/js/bottomJs.js
@@ -0,0 +1,175 @@
+/*
+ Copyright (c) 2016, 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.
+ */
+
+var removeCustomParam = function () {
+ $(this).parent().parent().remove();
+};
+
+/**
+ * Following function would execute
+ * when a user clicks on the list item
+ * initial mode and with out select mode.
+ */
+function InitiateViewOption() {
+ $(location).attr('href', $(this).data("url"));
+}
+
+$("#back-to-search").click(function () {
+ $('#advance-search-result').addClass('hidden');
+ $("#advance-search-form").removeClass('hidden');
+ $("#view-search-param").addClass('hidden');
+ $("#back-to-search").addClass('hidden');
+});
+
+$("#view-search-param").click(function () {
+ $("#advance-search-form").removeClass('hidden');
+ $(".title-result").addClass('hidden');
+ $("#view-search-param").addClass('hidden');
+});
+
+var dynamicForm = '
+ {{/each}}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs
new file mode 100644
index 0000000000..983b61c66e
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs
@@ -0,0 +1,125 @@
+
+{{#zone "content"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
Advanced Device Search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Searching for Devices . . .
+
+
+
+
+
+
+
+ Advanced Search Results
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{/zone}}
+{{#zone "bottomJs"}}
+ {{js "/js/bottomJs.js"}}
+
+{{/zone}}
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.js
new file mode 100644
index 0000000000..75c34b8e0e
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.js
@@ -0,0 +1,44 @@
+/*
+ Copyright (c) 2016, 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.
+ */
+
+/**
+ * Returns the dynamic state to be populated by add-user page.
+ *
+ * @param context Object that gets updated with the dynamic state of this page to be presented
+ * @returns {*} A context object that returns the dynamic state of this page to be presented
+ */
+function onRequest(context) {
+ var log = new Log("units/user-create/certificate-create.js");
+ var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
+ var response = userModule.getRolesByUserStore();
+ var mdmProps = require("/app/modules/conf-reader/main.js")["conf"];
+ if (response["status"] == "success") {
+ context["roles"] = response["content"];
+ }
+
+ context["charLimit"] = mdmProps["usernameLength"];
+ context["usernameJSRegEx"] = mdmProps["userValidationConfig"]["usernameJSRegEx"];
+ context["usernameHelpText"] = mdmProps["userValidationConfig"]["usernameHelpMsg"];
+ context["usernameRegExViolationErrorMsg"] = mdmProps["userValidationConfig"]["usernameRegExViolationErrorMsg"];
+ context["firstnameJSRegEx"] = mdmProps["userValidationConfig"]["firstnameJSRegEx"];
+ context["firstnameRegExViolationErrorMsg"] = mdmProps["userValidationConfig"]["firstnameRegExViolationErrorMsg"];
+ context["lastnameJSRegEx"] = mdmProps["userValidationConfig"]["lastnameJSRegEx"];
+ context["lastnameRegExViolationErrorMsg"] = mdmProps["userValidationConfig"]["lastnameRegExViolationErrorMsg"];
+
+ return context;
+}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.json
new file mode 100644
index 0000000000..c202f579cf
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.json
@@ -0,0 +1,5 @@
+{
+ "version": "1.0.0",
+ "uri": "/devices/search",
+ "layout": "cdmf.layout.default"
+}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs
index 2b6be8fd6d..1a58360409 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs
@@ -19,7 +19,6 @@
{{unit "cdmf.unit.lib.service-invoker-utility"}}
{{unit "cdmf.unit.lib.handlebars"}}
-{{unit deviceViewUnitName}}
{{#zone "breadcrumbs"}}
@@ -40,6 +39,7 @@
{{/zone}}
{{#zone "content"}}
+ {{unit deviceViewUnitName}}
{{unit "cdmf.unit.lib.data-table"}}
{{unit "cdmf.unit.device.operation-mod"}}
{{unit "cdmf.unit.device.view"}}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js
index 15c9b131f7..d7a19da36b 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.js
@@ -50,21 +50,24 @@ function onRequest(context) {
if (deviceCount > 0) {
page.deviceCount = deviceCount;
var utility = require("/app/modules/utility.js").utility;
- var data = deviceModule.getDeviceTypes();
+ var typesListResponse = deviceModule.getDeviceTypes();
var deviceTypes = [];
- if (data) {
- for (var i = 0; i < data.length; i++) {
- var config = utility.getDeviceTypeConfig(data[i].name);
- if (!config){
- continue;
+ if (typesListResponse["status"] == "success") {
+ var data = typesListResponse["content"];
+ if (data) {
+ for (var i = 0; i < data.length; i++) {
+ var config = utility.getDeviceTypeConfig(data[i].name);
+ if (!config) {
+ continue;
+ }
+ var deviceType = config.deviceType;
+ deviceTypes.push({
+ "type": data[i].name,
+ "category": deviceType.category,
+ "label": deviceType.label,
+ "thumb": utility.getDeviceThumb(data[i].name)
+ });
}
- var deviceType = config.deviceType;
- deviceTypes.push({
- "type": data[i].name,
- "category": deviceType.category,
- "label": deviceType.label,
- "thumb": utility.getDeviceThumb(data[i].name)
- });
}
}
page.deviceTypes = stringify(deviceTypes);
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.edit/edit.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.edit/edit.js
index 2bed273c68..fa2282141b 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.edit/edit.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.edit/edit.js
@@ -16,8 +16,8 @@
* under the License.
*/
-//function onRequest(context) {
-// var utility = require("/app/modules/utility.js").utility;
-// var deviceType = request.getParameter("type");
-// return {"deviceTypePolicyEdit": utility.getTenantedDeviceUnitName(deviceType, "policy-edit")};
-//}
\ No newline at end of file
+function onRequest(context) {
+ var utility = require("/app/modules/utility.js").utility;
+ var deviceType = request.getParameter("type");
+ return {"deviceTypePolicyEdit": utility.getTenantedDeviceUnitName(deviceType, "policy-edit")};
+}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.hbs
index 6295e4b87d..7b1a0775fe 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.hbs
@@ -15,7 +15,7 @@
specific language governing permissions and limitations
under the License.
}}
-{{unit "cdmf.unit.ui.title" pageTitle="Policy Management"}}
+{{unit "cdmf.unit.ui.title" pageTitle="Policy Management | Policy Priorities"}}
{{#zone "breadcrumbs"}}
{{/zone}}
{{#zone "content"}}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.json
index 96ec4c8d85..b8be6d8bbb 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.json
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.priority/priority.json
@@ -1,5 +1,5 @@
{
"version": "1.0.0",
- "uri": "/policy/priority",
+ "uri": "/policy/priority",
"layout": "cdmf.layout.default"
}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.view/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.view/view.js
index af7a8e700a..07e42077e6 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.view/view.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policy.view/view.js
@@ -16,8 +16,8 @@
* under the License.
*/
-//function onRequest(context) {
-// var utility = require("/app/modules/utility.js")["utility"];
-// var deviceType = request.getParameter("type");
-// return {"deviceTypePolicyView": utility.getTenantedDeviceUnitName(deviceType, "policy-view")};
-//}
+function onRequest(context) {
+ var utility = require("/app/modules/utility.js")["utility"];
+ var deviceType = request.getParameter("type");
+ return {"deviceTypePolicyView": utility.getTenantedDeviceUnitName(deviceType, "policy-view")};
+}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs
index d9f24cd04f..8716965fd2 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs
@@ -56,9 +56,9 @@
@@ -67,25 +67,19 @@
-
+
-
+
-
+
-
+
@@ -119,13 +113,17 @@
User was added successfully.
-
- An invitation mail will be sent to this user to initiate device enrollment.
+
+ An invitation mail will be sent to this user to initiate device enrollment.
+ Below QR code can also be used to enroll a device.
+
+
+
Please click "Add Another User", if you wish to add another user or click
"View User List" to complete the process and go back to the user list.
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.js
index 4cba6f75c3..a014415bc6 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.js
@@ -18,21 +18,22 @@
/**
* Returns the dynamic state to be populated by add-user page.
- *
- * @param context Object that gets updated with the dynamic state of this page to be presented
* @returns {*} A context object that returns the dynamic state of this page to be presented
*/
-function onRequest(context) {
+function onRequest() {
//var log = new Log("/app/pages/cdmf.page.user.create server-side js");
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var page = {};
- var response = userModule.getRolesByUserStore();
+ var response = userModule.getRolesByUserStore("PRIMARY");
if (response["status"] == "success") {
page["roles"] = response["content"];
}
+
+ var userStores = userModule.getSecondaryUserStores();
+ page["userStores"] = userStores;
page["charLimit"] = devicemgtProps["usernameLength"];
page["usernameJSRegEx"] = devicemgtProps["userValidationConfig"]["usernameJSRegEx"];
page["usernameHelpMsg"] = devicemgtProps["userValidationConfig"]["usernameHelpMsg"];
@@ -41,6 +42,7 @@ function onRequest(context) {
page["firstnameRegExViolationErrorMsg"] = devicemgtProps["userValidationConfig"]["firstnameRegExViolationErrorMsg"];
page["lastnameJSRegEx"] = devicemgtProps["userValidationConfig"]["lastnameJSRegEx"];
page["lastnameRegExViolationErrorMsg"] = devicemgtProps["userValidationConfig"]["lastnameRegExViolationErrorMsg"];
+ page["enrollmentURL"] = devicemgtProps["generalConfig"]["host"] + devicemgtProps["enrollmentDir"];
return page;
}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js
index 7280042d59..b417a8bd40 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ * Copyright (c) 2015, 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
@@ -72,8 +72,8 @@ var disableInlineError = function (inputField, errorMsg, errorSign) {
* Validate if provided username is valid against RegEx configures.
*/
validateInline["user-name"] = function () {
- var usernameinput = $("input#username");
- if (inputIsValid(usernameinput.data("regex"), usernameinput.val())) {
+ var usernameInput = $("input#username");
+ if (inputIsValid(usernameInput.data("regex"), usernameInput.val())) {
disableInlineError("usernameInputField", "usernameEmpty", "usernameError");
} else {
enableInlineError("usernameInputField", "usernameEmpty", "usernameError");
@@ -84,9 +84,9 @@ validateInline["user-name"] = function () {
* Validate if provided first name is valid against RegEx configures.
*/
validateInline["first-name"] = function () {
- var firstnameinput = $("input#firstname");
- if (firstnameinput.val()) {
- disableInlineError("firstNameField", "fnError");
+ var firstnameInput = $("input#firstname");
+ if (firstnameInput.val()) {
+ disableInlineError("firstNameField", "fnError");
} else {
enableInlineError("firstNameField", "fnError");
}
@@ -96,8 +96,8 @@ validateInline["first-name"] = function () {
* Validate if provided last name is valid against RegEx configures.
*/
validateInline["last-name"] = function () {
- var lastnameinput = $("input#lastname");
- if (lastnameinput.val()) {
+ var lastnameInput = $("input#lastname");
+ if (lastnameInput.val()) {
disableInlineError("lastNameField", "lnError");
} else {
enableInlineError("lastNameField", "lnError");
@@ -161,13 +161,25 @@ function emailIsValid(email) {
return regExp.test(email);
}
+/*
+ * QR-code generation function.
+ */
+function generateQRCode(qrCodeClass) {
+ var enrollmentURL = $("#qr-code-modal").data("enrollment-url");
+ $(qrCodeClass).qrcode({
+ text: enrollmentURL,
+ width: 200,
+ height: 200
+ });
+}
+
$("#userStore").change(
function () {
var str = "";
$("select option:selected").each(function () {
- str += $(this).text() + " ";
+ str += $(this).text() + "";
});
- var getRolesAPI = deviceMgtAPIsBasePath + "/roles/"+ str;
+ var getRolesAPI = deviceMgtAPIsBasePath + "/roles?user-store=" + str + "&limit=100";
invokerUtil.get(
getRolesAPI,
@@ -188,8 +200,7 @@ $("#userStore").change(
}
);
- }
-).change();
+ }).change();
$(document).ready(function () {
$("#emailValidationText").hide();
@@ -207,7 +218,7 @@ $(document).ready(function () {
var usernameInput = $("input#username");
var firstnameInput = $("input#firstname");
var lastnameInput = $("input#lastname");
- //var charLimit = parseInt($("input#username").attr("limit"));
+ var charLimit = parseInt($("input#username").attr("limit"));
var domain = $("#userStore").val();
var username = usernameInput.val().trim();
var firstname = firstnameInput.val();
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.hbs
index 4597dae477..8db65617b9 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/edit.hbs
@@ -15,7 +15,7 @@
specific language governing permissions and limitations
under the License.
}}
-{{unit "cdmf.unit.ui.title" pageTitle="User Management"}}
+{{unit "cdmf.unit.ui.title" pageTitle="User Management | Edit User"}}
{{#zone "breadcrumbs"}}
-
- Please click "Go back to configurations", if you wish to save another
- configuration or click
- "Exit" to complete the process and go back to the dashboard.
-
-
-
+
+
+
Configuration was saved successfully.
+
+ Please click "Go back to configurations", if you wish to save another
+ configuration or click
+ "Exit" to complete the process and go back to the dashboard.
+
+
+
+
+
-
-
+{{/zone}}
{{#zone "bottomJs"}}
{{js "js/platform-configuration.js"}}
{{/zone}}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.js
index e34720df7b..ce96d0d1a0 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/configuration.js
@@ -20,15 +20,26 @@ function onRequest(context) {
var utility = require("/app/modules/utility.js").utility;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
//get all device types
- var data = deviceModule.getDeviceTypes();
var deviceTypesArray = [];
- if (data) {
- for (var i = 0; i < data.length; i++) {
- var deviceTypeName = data[i].name;
- var configUnitName = utility.getTenantedDeviceUnitName(deviceTypeName, "platform.configuration");
- if(configUnitName) {
- var deviceTypeConfig = utility.getDeviceTypeConfig(deviceTypeName);
- deviceTypesArray.push({name: deviceTypeName, label:deviceTypeConfig.deviceType.label, unitName : configUnitName});
+ var typesListResponse = deviceModule.getDeviceTypes();
+ if (typesListResponse["status"] == "success") {
+ var data = typesListResponse["content"].deviceTypes;
+ if (data) {
+ for (var i = 0; i < data.length; i++) {
+ var deviceTypeName = data[i];
+ var configUnitName = utility.getTenantedDeviceUnitName(deviceTypeName, "platform.configuration");
+ if (configUnitName) {
+ var deviceTypeConfig = utility.getDeviceTypeConfig(deviceTypeName);
+ var deviceTypeLabel = deviceTypeName;
+ if (deviceTypeConfig) {
+ deviceTypeLabel = deviceTypeConfig.deviceType.label;
+ }
+ deviceTypesArray.push({
+ name: deviceTypeName,
+ label: deviceTypeLabel,
+ unitName: configUnitName
+ });
+ }
}
}
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/public/js/platform-configuration.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/public/js/platform-configuration.js
index f2704873a4..2f739d228a 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/public/js/platform-configuration.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.platform.configuration/public/js/platform-configuration.js
@@ -41,7 +41,7 @@ $(document).ready(function () {
}
invokerUtil.get(
- "/devicemgt_admin/configuration",
+ "/api/device-mgt/v1.0/configuration",
function (data) {
data = JSON.parse(data);
if (data && data.configuration) {
@@ -85,13 +85,13 @@ $(document).ready(function () {
configList.push(monitorFrequency);
addConfigFormData.configuration = configList;
- var addConfigAPI = "/devicemgt_admin/configuration";
- invokerUtil.post(
+ var addConfigAPI = "/api/device-mgt/v1.0/configuration";
+ invokerUtil.put(
addConfigAPI,
addConfigFormData,
- function (data) {
- data = JSON.parse(data);
- if (data.statusCode == responseCodes["SUCCESS"]) {
+ function (data, textStatus, jqXHR) {
+ data = jqXHR.status;
+ if (data == 200) {
$("#config-save-form").addClass("hidden");
$("#record-created-msg").removeClass("hidden");
} else if (data == 500) {
@@ -118,3 +118,12 @@ $(document).ready(function () {
}
});
});
+
+// Start of HTML embedded invoke methods
+var showAdvanceOperation = function (operation, button) {
+ $(button).addClass('selected');
+ $(button).siblings().removeClass('selected');
+ var hiddenOperation = ".wr-hidden-operations-content > div";
+ $(hiddenOperation + '[data-operation="' + operation + '"]').show();
+ $(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide();
+};
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs
index 3e59c7fe39..adfadb50ab 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs
@@ -1,306 +1,85 @@
+{{!
+ Copyright (c) 2016, 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.
+}}
{{#zone "content"}}
-
-
-
-
-
-
1
-
Select a platform
-
-
-
-
-
-
2
-
Configure profile
-
-
-
-
-
-
3
-
Assign to groups
-
-
-
-
-
-
4
-
Publish to devices
-
-
-
-
-
-
-
-
Policy creation is successful.
- Please click "Add Another Policy", if you wish to add another policy or click
- "View policy list" to complete the process and go back to the policy list.
-
-
-
-
-
-
-
- Add another policy
-
-
- This configuration can be used to set a passcode policy to an Android Device.
- Once this configuration profile is installed on a device, corresponding users will not be
- able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Restrictions
-
-
-
- This configurations can be used to restrict certain settings on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be
- able
- to modify these settings on their devices.
-
- This configuration can be used to encrypt data on an Android device, when the device is
- locked and
- make it readable when the passcode is entered. Once this configuration profile is installed
- on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you do not need the device to be encrypted.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Wi-Fi Settings
-
-
-
- This configurations can be used to configure Wi-Fi access on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be
- able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Application Restriction Settings
-
-
-
- This configuration can be used to create a black list or white list of applications.
-
- This configurations can be used to configure VPN settings on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be
- able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
- This configuration can be used to set a passcode policy to an iOS Device.
- Once this configuration profile is installed on a device, corresponding users
- will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VPN Settings
-
-
-
- This configurations can be used to configure VPN settings on an iOS device.
- Once this configuration profile is installed on a device, corresponding users will not
- be able
- to modify these settings on their devices.
-
-
-
-
-Please note that * sign represents required fields of data.
-
-
-
-
- This configuration can be used to configure add-on VPN software (per-app VPN),
- and it works only on VPN services of
- type 'VPN'. Once this configuration profile is installed on a device,
- corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
-
- This configuration can be used to configure app-to-per-app VPN mappings.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
-
- These configurations can be used to set how devices connect to your wireless network(s),
- including the necessary authentication
- information. Once this configuration profile is installed on an iOS device,
- corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- For Manual Proxy Setup :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-For WEP, WPA or ANY Encryption Security Type :
-
-
-
-
- These configurations can be used to define settings for connecting
- to your POP or IMAP email accounts.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Incoming Mail Settings :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Outgoing Mail Settings :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AirPlay Settings
-
-
-
- This configuration can be used to define settings for connecting to AirPlay
- destinations.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
- This configuration can be used to define settings for connecting to LDAP
- servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
- This configuration can be used to define settings for connecting to CalDAV
- servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Calendar Subscription
-
-
-
- This configuration can be used to define settings for calendar subscriptions.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Access Point Names ( APN )
-
-
-
- These configurations can be used to specify Access Point Names ( APN ).
- Once this configuration profile is installed on an iOS device, corresponding
- users will not
- be able to modify these settings on their devices.
-
(This feature is not supported on iOS 7.0 and later.)
-
- These configurations can be used to specify Cellular Network Settings on an iOS
- device.
- Cellular settings cannot be installed if an APN setting is already installed and
- upon successful installation, corresponding users will not be able to modify
- these
- settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
- These configurations can be used to restrict apps, device features and
- media content available on an iOS device. Once this configuration profile is installed
- on a device, corresponding users will not be able to modify these settings on their
- devices.
-
- This configuration can be used to set a passcode policy to an Windows Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Restrictions on Camera
-
-
-
- This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you need to disable camera.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Encryption Settings
-
-
-
- This configuration can be used to encrypt data on an Windows device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you need to disable storage-encryption.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Application Restriction Settings
-
-
-
- This configuration can be used to create a black list or white list of applications.
-
- This configuration can be used to set a passcode policy to an Android Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Restrictions
-
-
-
- This configurations can be used to restrict certain settings on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Below restrictions will be applied on devices with Android version 5.0 Lollipop onwards only
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Bellow restrictions will be applied on devices with Android version 6.0 Marshmallow onwards only.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Encryption Settings
-
-
-
- This configuration can be used to encrypt data on an Android device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you do not need the device to be encrypted.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Wi-Fi Settings
-
-
-
- This configurations can be used to configure Wi-Fi access on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
- This configurations can be used to configure VPN settings on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
- This configuration can be used to set a passcode policy to an iOS Device.
- Once this configuration profile is installed on a device, corresponding users
- will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VPN Settings
-
-
-
- This configurations can be used to configure VPN settings on an iOS device.
- Once this configuration profile is installed on a device, corresponding users will not
- be able
- to modify these settings on their devices.
-
-
-
-
-Please note that * sign represents required fields of data.
-
-
-
-
- This configuration can be used to configure add-on VPN software (per-app VPN),
- and it works only on VPN services of
- type 'VPN'. Once this configuration profile is installed on a device,
- corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
-
- This configuration can be used to configure app-to-per-app VPN mappings.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
-
- These configurations can be used to set how devices connect to your wireless network(s),
- including the necessary authentication
- information. Once this configuration profile is installed on an iOS device,
- corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- For Manual Proxy Setup :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-For WEP, WPA or ANY Encryption Security Type :
-
-
-
-
- These configurations can be used to define settings for connecting
- to your POP or IMAP email accounts.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Incoming Mail Settings :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Outgoing Mail Settings :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AirPlay Settings
-
-
-
- This configuration can be used to define settings for connecting to AirPlay
- destinations.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
- This configuration can be used to define settings for connecting to LDAP
- servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
- This configuration can be used to define settings for connecting to CalDAV
- servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Calendar Subscription
-
-
-
- This configuration can be used to define settings for calendar subscriptions.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Access Point Names ( APN )
-
-
-
- These configurations can be used to specify Access Point Names ( APN ).
- Once this configuration profile is installed on an iOS device, corresponding
- users will not
- be able to modify these settings on their devices.
-
(This feature is not supported on iOS 7.0 and later.)
-
- These configurations can be used to specify Cellular Network Settings on an iOS
- device.
- Cellular settings cannot be installed if an APN setting is already installed and
- upon successful installation, corresponding users will not be able to modify
- these
- settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
- These configurations can be used to restrict apps, device features and
- media content available on an iOS device. Once this configuration profile is installed
- on a device, corresponding users will not be able to modify these settings on their
- devices.
-
- This configuration can be used to set a passcode policy to an Windows Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Restrictions on Camera
-
-
-
- This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you need to disable camera.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Encryption Settings
-
-
-
- This configuration can be used to encrypt data on an Windows device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you need to disable storage-encryption.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Application Restriction Settings
-
-
-
- This configuration can be used to create a black list or white list of applications.
-
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/priority.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/priority.hbs
index 5a7fea7f8a..f4c6ff7754 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/priority.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/priority.hbs
@@ -15,20 +15,19 @@
specific language governing permissions and limitations
under the License.
}}
+
- This configuration can be used to set a passcode policy to an Android Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Restrictions
-
-
-
- This configurations can be used to restrict certain settings on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Bellow restrictions will be applied on devices with Android version 5.0 Lollipop onwards only
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Bellow restrictions will be applied on devices with Android version 6.0 Marshmallow onwards only.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Encryption Settings
-
-
-
- This configuration can be used to encrypt data on an Android device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you do not need the device to be encrypted.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Wi-Fi Settings
-
-
-
- This configurations can be used to configure Wi-Fi access on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
- This configurations can be used to configure VPN settings on an Android device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
- This configuration can be used to set a passcode policy to an iOS Device.
- Once this configuration profile is installed on a device, corresponding users
- will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VPN Settings
-
-
-
- This configurations can be used to configure VPN settings on an iOS device.
- Once this configuration profile is installed on a device, corresponding users will not
- be able
- to modify these settings on their devices.
-
-
-
-
-Please note that * sign represents required fields of data.
-
-
-
-
- This configuration can be used to configure add-on VPN software (per-app VPN),
- and it works only on VPN services of
- type 'VPN'. Once this configuration profile is installed on a device,
- corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
-
- This configuration can be used to configure app-to-per-app VPN mappings.
- Once this configuration profile is installed on a device, corresponding users will
- not be able
- to modify these settings on their devices.
-
-
-
-
- Please note that * sign represents required fields of data.
-
-
-
-
- These configurations can be used to set how devices connect to your wireless network(s),
- including the necessary authentication
- information. Once this configuration profile is installed on an iOS device,
- corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- For Manual Proxy Setup :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-For WEP, WPA or ANY Encryption Security Type :
-
-
-
-
- These configurations can be used to define settings for connecting
- to your POP or IMAP email accounts.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Incoming Mail Settings :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Outgoing Mail Settings :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AirPlay Settings
-
-
-
- This configuration can be used to define settings for connecting to AirPlay
- destinations.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
- This configuration can be used to define settings for connecting to LDAP
- servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
- This configuration can be used to define settings for connecting to CalDAV
- servers.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Calendar Subscription
-
-
-
- This configuration can be used to define settings for calendar subscriptions.
- Once this configuration profile is installed on an iOS device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Access Point Names ( APN )
-
-
-
- These configurations can be used to specify Access Point Names ( APN ).
- Once this configuration profile is installed on an iOS device, corresponding
- users will not
- be able to modify these settings on their devices.
-
(This feature is not supported on iOS 7.0 and later.)
-
- These configurations can be used to specify Cellular Network Settings on an iOS
- device.
- Cellular settings cannot be installed if an APN setting is already installed and
- upon successful installation, corresponding users will not be able to modify
- these
- settings on their devices.
-
(This feature is supported only on iOS 7.0 and later.)
-
- These configurations can be used to restrict apps, device features and
- media content available on an iOS device. Once this configuration profile is installed
- on a device, corresponding users will not be able to modify these settings on their
- devices.
-
- This configuration can be used to set a passcode policy to an Windows Device.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Restrictions on Camera
-
-
-
- This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
- Once this configuration profile is installed on a device, corresponding users will not be able
- to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you need to disable camera.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Encryption Settings
-
-
-
- This configuration can be used to encrypt data on an Windows device, when the device is locked and
- make it readable when the passcode is entered. Once this configuration profile is installed on a device,
- corresponding users will not be able to modify these settings on their devices.
-
-
-
-
-
-
-
- Un-check following checkbox in case you need to disable storage-encryption.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Application Restriction Settings
-
-
-
- This configuration can be used to create a black list or white list of applications.
-
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.hbs
index b74abb7dc4..a93d3173a0 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/create.hbs
@@ -47,7 +47,7 @@
-
+
@@ -106,6 +106,7 @@
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/public/js/bottomJs.js
index cad7431f81..5a7d7eb304 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/public/js/bottomJs.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.create/public/js/bottomJs.js
@@ -31,6 +31,8 @@ function inputIsValid(regExp, inputString) {
var validateInline = {};
var clearInline = {};
+var apiBasePath = "/api/device-mgt/v1.0";
+
var enableInlineError = function (inputField, errorMsg, errorSign) {
var fieldIdentifier = "#" + inputField;
var errorMsgIdentifier = "#" + inputField + " ." + errorMsg;
@@ -113,12 +115,12 @@ function formatRepoSelection (user) {
}
$(document).ready(function () {
-
+ var appContext = $("#app-context").data("app-context");
$("#users").select2({
multiple:true,
tags: false,
ajax: {
- url: window.location.origin + "/devicemgt/api/invoker/execute/",
+ url: appContext + "/api/invoker/execute/",
method: "POST",
dataType: 'json',
delay: 250,
@@ -128,15 +130,17 @@ $(document).ready(function () {
data: function (params) {
var postData = {};
postData.actionMethod = "GET";
- postData.actionUrl = "/devicemgt_admin/users/view-users?username=" + params.term;
+ postData.actionUrl = apiBasePath + "/users/search/usernames?filter=" + params.term;
postData.actionPayload = null;
return JSON.stringify(postData);
},
processResults: function (data, page) {
var newData = [];
- $.each(data.responseContent, function (index, value) {
- value.id = value.username;
- newData.push(value);
+ $.each(data, function (index, value) {
+ var user = {};
+ user.username = value.username;
+ user.id = value.username;
+ newData.push(user);
});
return {
results: newData
@@ -153,7 +157,7 @@ $(document).ready(function () {
/**
* Following click function would execute
* when a user clicks on "Add Role" button
- * on Add Role page in WSO2 Devicemgt Console.
+ * on Add Role page in WSO2 MDM Console.
*/
$("button#add-role-btn").click(function() {
var rolenameInput = $("input#rolename");
@@ -188,7 +192,7 @@ $(document).ready(function () {
}
addRoleFormData.users = users;
- var addRoleAPI = "/devicemgt_admin/roles";
+ var addRoleAPI = apiBasePath + "/roles";
invokerUtil.post(
addRoleAPI,
@@ -205,10 +209,10 @@ $(document).ready(function () {
//// Refreshing with success message
//$("#role-create-form").addClass("hidden");
//$("#role-created-msg").removeClass("hidden");
- window.location.href = '/devicemgt/role/edit-permission/' + roleName + '?wizard=true';
+ window.location.href = appContext + '/role/edit-permission/' + roleName;
}
}, function (data) {
- if (JSON.parse(data.responseText).errorMessage.indexOf("RoleExisting") > -1) {
+ if (JSON.parse(data).errorMessage.indexOf("RoleExisting") > -1) {
$(errorMsg).text("Role name : " + roleName + " already exists. Pick another role name.");
} else {
$(errorMsg).text(JSON.parse(data.responseText).errorMessage);
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs
index ad3b495e28..26628391df 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs
@@ -78,6 +78,20 @@
+
+
+
+
+
Can't deselect child permissions when parent permission is selected.
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.js
index 6829dc21e3..5790f1b7ff 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.js
@@ -26,7 +26,7 @@ function onRequest(context) {
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var uri = request.getRequestURI();
var uriMatcher = new URIMatcher(String(uri));
- var isMatched = uriMatcher.match("/{context}/roles/edit-role-permission/{rolename}");
+ var isMatched = uriMatcher.match("/{context}/role/edit-permission/{rolename}");
if (isMatched) {
var matchedElements = uriMatcher.elements();
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/public/js/bottomJs.js
index 2989ce3924..7c778de040 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/public/js/bottomJs.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/public/js/bottomJs.js
@@ -31,6 +31,8 @@
var modalPopup = ".wr-modalpopup";
var modalPopupContent = modalPopup + " .modalpopup-content";
+var apiBasePath = "/api/device-mgt/v1.0";
+
/*
* hide popup function.
*/
@@ -96,29 +98,33 @@ $(document).ready(function () {
var listPartialSrc = $("#list-partial").attr("src");
var treeTemplateSrc = $("#tree-template").attr("src");
var roleName = $("#permissionList").data("currentrole");
- var serviceUrl = "/devicemgt_admin/roles/permissions?rolename=" + encodeURIComponent(roleName);
+ var serviceUrl = apiBasePath + "/roles/" +encodeURIComponent(roleName)+"/permissions";
$.registerPartial("list", listPartialSrc, function(){
$.template("treeTemplate", treeTemplateSrc, function (template) {
invokerUtil.get(serviceUrl,
function(data){
data = JSON.parse(data);
- var treeData = data.responseContent;
+ var treeData = data;
if(treeData.nodeList.length > 0){
treeData = { nodeList: treeData.nodeList };
var content = template(treeData);
$("#permissionList").html(content);
- $("#permissionList").on("click", ".permissionTree .permissionItem", function() {
+ $("#permissionList").on("click", ".permissionTree .permissionItem", function(){
var parentValue = $(this).prop('checked');
$(this).closest("li").find("li input").each(function () {
$(this).prop('checked',parentValue);
});
});
}
- $("#permissionList li input").click(function() {
+ $("#permissionList li input").click(function(){
var parentInput = $(this).parents("ul:eq(1) > li").find('input:eq(0)');
if(parentInput && parentInput.is(':checked')){
- parentInput.prop('checked', false);
- return true;
+ $(modalPopupContent).html($('#child-deselect-error-content').html());
+ showPopup();
+ $("a#child-deselect-error-link").click(function () {
+ hidePopup();
+ });
+ return false;
}
});
$('#permissionList').tree_view();
@@ -135,24 +141,25 @@ $(document).ready(function () {
*/
$("button#update-permissions-btn").click(function() {
var roleName = $("#permissionList").data("currentrole");
- var updateRolePermissionAPI = "/devicemgt_admin/roles?rolename=" + roleName;
+ var updateRolePermissionAPI = apiBasePath + "/roles/" + roleName;
var updateRolePermissionData = {};
var perms = [];
$("#permissionList li input:checked").each(function(){
perms.push($(this).data("resourcepath"));
- });
+ })
updateRolePermissionData.permissions = perms;
invokerUtil.put(
updateRolePermissionAPI,
updateRolePermissionData,
- function (jqXHR) {
- if (JSON.parse(jqXHR).status == 200 || jqXHR.status == 200) {
+ function (data, textStatus, jqXHR) {
+ if (jqXHR.status == 200) {
// Refreshing with success message
$("#role-create-form").addClass("hidden");
$("#role-created-msg").removeClass("hidden");
}
}, function (data) {
- $(errorMsg).text(JSON.parse(data.responseText).errorMessage);
+ var payload = JSON.parse(data.responseText);
+ $(errorMsg).text(payload.message);
$(errorMsgWrapper).removeClass("hidden");
}
);
@@ -162,4 +169,4 @@ $(document).ready(function () {
function get(name){
if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))
return decodeURIComponent(name[1]);
-}
\ No newline at end of file
+}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs
index 3ed8209cf7..249e35a6e3 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs
@@ -29,7 +29,7 @@
-
+
@@ -81,6 +81,7 @@
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/public/js/bottomJs.js
index f8c42854cf..e038c32592 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/public/js/bottomJs.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/public/js/bottomJs.js
@@ -1,21 +1,3 @@
-/*
- * Copyright (c) 2016, 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.
- */
-
/**
* Checks if provided input is valid against RegEx input.
*
@@ -31,6 +13,8 @@ function inputIsValid(regExp, inputString) {
var validateInline = {};
var clearInline = {};
+var apiBasePath = "/api/device-mgt/v1.0";
+
var enableInlineError = function (inputField, errorMsg, errorSign) {
var fieldIdentifier = "#" + inputField;
var errorMsgIdentifier = "#" + inputField + " ." + errorMsg;
@@ -113,12 +97,12 @@ function formatRepoSelection (user) {
}
$(document).ready(function () {
-
+ var appContext = $("#app-context").data("app-context");
$("#users").select2({
multiple:true,
tags: false,
ajax: {
- url: window.location.origin + "/devicemgt/api/invoker/execute/",
+ url: appContext + "/api/invoker/execute/",
method: "POST",
dataType: 'json',
delay: 250,
@@ -128,7 +112,7 @@ $(document).ready(function () {
data: function (params) {
var postData = {};
postData.actionMethod = "GET";
- postData.actionUrl = "/devicemgt_admin/users/view-users?username=" + params.term;
+ postData.actionUrl = apiBasePath + "/users/search/usernames?filter=" + params.term;
postData.actionPayload = null;
return JSON.stringify(postData);
},
@@ -155,7 +139,7 @@ $(document).ready(function () {
/**
* Following click function would execute
* when a user clicks on "Add Role" button
- * on Add Role page in WSO2 Devicemgt Console.
+ * on Add Role page in WSO2 MDM Console.
*/
$("button#add-role-btn").click(function() {
var rolenameInput = $("input#rolename");
@@ -183,12 +167,12 @@ $(document).ready(function () {
addRoleFormData.roleName = domain + "/" + roleName;
}
- var addRoleAPI = "/devicemgt_admin/roles?rolename=" + encodeURIComponent(currentRoleName);
+ var addRoleAPI = apiBasePath + "/roles/" + currentRoleName;
invokerUtil.put(
addRoleAPI,
addRoleFormData,
- function (jqXHR) {
- if (JSON.parse(jqXHR).status == 200 || jqXHR.status == 200) {
+ function (data, textStatus, jqXHR) {
+ if (jqXHR.status == 200) {
// Clearing user input fields.
$("input#rolename").val("");
$("#domain").val("");
@@ -197,7 +181,8 @@ $(document).ready(function () {
$("#role-created-msg").removeClass("hidden");
}
}, function (data) {
- $(errorMsg).text(JSON.parse(data.responseText).errorMessage);
+ var payload = JSON.parse(data.responseText);
+ $(errorMsg).text(payload.message);
$(errorMsgWrapper).removeClass("hidden");
}
);
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/listing.hbs
index fc648ff450..acf56f7963 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/listing.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/listing.hbs
@@ -47,19 +47,6 @@
By Role Name
-
-
-
-
-
-
-
-
-
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/public/js/role-listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/public/js/role-listing.js
index bee418fd1c..afeb0a393e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/public/js/role-listing.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/public/js/role-listing.js
@@ -20,6 +20,8 @@ var loadRoleBasedActionURL = function (action, rolename) {
$(location).attr('href', href);
};
+var apiBasePath = "/api/device-mgt/v1.0";
+
/**
* Following function would execute
* when a user clicks on the list item
@@ -38,34 +40,34 @@ var loadPaginatedObjects = function (objectGridId, objectGridContainer, objectGr
var templateSrc = $(objectGridTemplateSrc).attr("src");
$.template(objectGridId, templateSrc, function (template) {
invokerUtil.get(serviceURL,
- function (data) {
- data = callback(data);
- if (data.length > 0 && data != null) {
- $('#ast-container').removeClass('hidden');
- $('#role-listing-status').hide();
- for (var i = 0; i < data.viewModel.roles.length; i++) {
- data.viewModel.roles[i].adminRole = $("#role-table").data("role");
- }
- var content = template(data.viewModel);
- $(objectGridContainer).html(content);
- if (isInit) {
- $('#role-grid').datatables_extended();
- isInit = false;
- }
- $("#dt-select-all").addClass("hidden");
- $(".icon .text").res_text(0.2);
- } else {
- $('#ast-container').addClass('hidden');
- $('#role-listing-status-msg').text('No roles are available to be displayed.');
- $('#role-listing-status').show();
- }
+ function (data) {
+ data = callback(data);
+ if (data.length > 0 && data != null) {
+ $('#ast-container').removeClass('hidden');
+ $('#role-listing-status').hide();
+ for (var i = 0; i < data.viewModel.roles.length; i++) {
+ data.viewModel.roles[i].adminRole = $("#role-table").data("role");
+ }
+ var content = template(data.viewModel);
+ $(objectGridContainer).html(content);
+ if (isInit) {
+ $('#role-grid').datatables_extended_serverside_paging();
+ isInit = false;
+ }
+ $("#dt-select-all").addClass("hidden");
+ $(".icon .text").res_text(0.2);
+ } else {
+ $('#ast-container').addClass('hidden');
+ $('#role-listing-status-msg').text('No roles are available to be displayed.');
+ $('#role-listing-status').show();
+ }
- //$(objectGridId).datatables_extended();
- }, function (message) {
- $('#ast-container').addClass('hidden');
- $('#role-listing-status-msg').text('Invalid search query. Try again with a valid search ' +
- 'query');
- $('#role-listing-status').show();
+ //$(objectGridId).datatables_extended();
+ }, function (message) {
+ $('#ast-container').addClass('hidden');
+ $('#role-listing-status-msg').text('Invalid search query. Try again with a valid search ' +
+ 'query');
+ $('#role-listing-status').show();
});
});
};
@@ -73,46 +75,72 @@ var loadPaginatedObjects = function (objectGridId, objectGridContainer, objectGr
function loadRoles(searchQuery) {
var loadingContent = $("#loading-content");
loadingContent.show();
- var serviceURL = "/devicemgt_admin/roles";
- if (searchQuery) {
- serviceURL = serviceURL + "/search?filter=" + searchQuery;
+
+ var dataFilter = function(data){
+ data = JSON.parse(data);
+
+ var objects = [];
+
+ $(data.roles).each(function( index ) {
+ objects.push({name: data.roles[index], DT_RowId : "role-" + data.roles[index]})
+ });
+
+ json = {
+ "recordsTotal": data.count,
+ "recordsFiltered": data.count,
+ "data": objects
+ };
+
+ return JSON.stringify( json );
}
- var callback = function (data) {
- if (data != null || data == "null") {
- data = JSON.parse(data);
- var canRemove = $("#can-remove").val();
- var canEdit = $("#can-edit").val();
- var roles = [];
- for(var i=0; i '
+ },
+ {
+ class: "fade-edge remove-padding-top",
+ data: "name",
+ defaultContent: ''
+ },
+ {
+ class: "text-right content-fill text-left-on-grid-view no-wrap",
+ data: null,
+ render: function ( data, type, row, meta ) {
+ return '' +
+ '' +
+ '' +
+ '' +
+ 'Edit' +
+ '' +
+ '' +
+ '' +
+ '' +
+ 'Edit Permission' +
+ '' +
+ '' +
+ 'Remove'
}
}
- return data;
+ ];
+
+ var options = {
+ "placeholder": "Search By Role Name",
+ "searchKey" : "filter"
};
- loadPaginatedObjects("#role-grid", "#ast-container", "#role-listing", serviceURL, callback);
+ $('#role-grid').datatables_extended_serverside_paging(null, '/api/device-mgt/v1.0/roles', dataFilter, columns, fnCreatedRow, null, options);
+
loadingContent.hide();
- var sortableElem = '.wr-sortable';
- $(sortableElem).sortable({
- beforeStop: function () {
- var sortedIDs = $(this).sortable('toArray');
- }
- });
- $(sortableElem).disableSelection();
+
}
var modalPopup = ".wr-modalpopup";
@@ -153,7 +181,7 @@ function hidePopup() {
*/
$("#role-grid").on("click", ".remove-role-link", function () {
var role = $(this).data("role");
- var removeRoleAPI = "/devicemgt_admin/roles?rolename=" + role;
+ var removeRoleAPI = apiBasePath + "/roles/" + role;
$(modalPopupContent).html($('#remove-role-modal-content').html());
showPopup();
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js
new file mode 100644
index 0000000000..16a232b843
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js
@@ -0,0 +1,83 @@
+/**
+ * Checks if provided input is valid against RegEx input.
+ *
+ * @param regExp Regular expression
+ * @param inputString Input string to check
+ * @returns {boolean} Returns true if input matches RegEx
+ */
+function inputIsValid(regExp, inputString) {
+ regExp = new RegExp(regExp);
+ return regExp.test(inputString);
+}
+
+$(document).ready(function () {
+ var modalPopup = ".wr-modalpopup";
+ // var modalPopupContainer = modalPopup + " .modalpopup-container";
+ var modalPopupContent = modalPopup + " .modalpopup-content";
+
+ $("#change-password").click(function () {
+
+ $(modalPopupContent).html($('#change-password-window').html());
+ showPopup();
+
+ $("a#change-password-yes-link").click(function () {
+ var oldPassword = $("#old-password").val();
+ var newPassword = $("#new-password").val();
+ var confirmedPassword = $("#confirmed-password").val();
+ var user = $("#user").val();
+
+ var errorMsgWrapper = "#notification-error-msg";
+ var errorMsg = "#notification-error-msg span";
+ if (!oldPassword) {
+ $(errorMsg).text("Old password is a required field. It cannot be empty.");
+ $(errorMsgWrapper).removeClass("hidden");
+ } else if (!newPassword) {
+ $(errorMsg).text("New password is a required field. It cannot be empty.");
+ $(errorMsgWrapper).removeClass("hidden");
+ } else if (!confirmedPassword) {
+ $(errorMsg).text("Retyping the new password is required.");
+ $(errorMsgWrapper).removeClass("hidden");
+ } else if (confirmedPassword != newPassword) {
+ $(errorMsg).text("New password doesn't match the confirmation.");
+ $(errorMsgWrapper).removeClass("hidden");
+ } else if (!inputIsValid(/^[\S]{5,30}$/, confirmedPassword)) {
+ $(errorMsg).text("Password should be minimum 5 characters long, should not include any whitespaces.");
+ $(errorMsgWrapper).removeClass("hidden");
+ } else {
+ var changePasswordFormData = {};
+ //changePasswordFormData.username = user;
+ changePasswordFormData.newPassword = unescape((confirmedPassword));
+ changePasswordFormData.oldPassword = unescape((oldPassword));
+
+
+ var changePasswordAPI = "/api/device-mgt/v1.0/users/" + user + "/credentials";
+
+ invokerUtil.put(
+ changePasswordAPI,
+ changePasswordFormData,
+ function (data, textStatus, jqXHR) {
+ if (jqXHR.status == 200 && data) {
+ $(modalPopupContent).html($('#change-password-success-content').html());
+ $("#change-password-success-link").click(function () {
+ hidePopup();
+ });
+ }
+ }, function (jqXHR) {
+ if (jqXHR.status == 400) {
+ $(errorMsg).text("Old password does not match with the provided value.");
+ $(errorMsgWrapper).removeClass("hidden");
+ } else {
+ $(errorMsg).text("An unexpected error occurred. Please try again later.");
+ $(errorMsgWrapper).removeClass("hidden");
+ }
+ }
+ );
+ }
+
+ });
+
+ $("a#change-password-cancel-link").click(function () {
+ hidePopup();
+ });
+ });
+});
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs
index 5fc7ac3bca..21b7c28f3e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.hbs
@@ -17,6 +17,70 @@
}}
{{#zone "userMenu-items"}}
+{{/zone}}
+{{#zone "bottomJs"}}
+
{{/zone}}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.js
new file mode 100644
index 0000000000..e0ebe26b0a
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/user-menu.js
@@ -0,0 +1,4 @@
+function onRequest() {
+ var constants = require("/app/modules/constants.js");
+ return session.get(constants["USER_SESSION_KEY"]);
+}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/config/iot-config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/config/iot-config.json
deleted file mode 100644
index 708d1eca74..0000000000
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/config/iot-config.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "IoTMgtHost" : "localhost"
-}
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/config/service-provider.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/config/service-provider.json
deleted file mode 100644
index b2041d5def..0000000000
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/config/service-provider.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "grantType": "password urn:ietf:params:oauth:grant-type:saml2-bearer refresh_token",
- "saasApp": true,
- "tokenScope": "admin",
- "requireDynamicClientRegistration": true,
- "audience": "https://localhost:9443/oauth2/token",
- "assertionConsumerURL": "https://localhost:9443/devicemgt/sso/acs",
- "recepientValidationURL": "https://localhost:9443/oauth2/token"
-}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/jaggery.conf b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/jaggery.conf
index 8397121567..dec7a25f8c 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/jaggery.conf
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/jaggery.conf
@@ -50,6 +50,10 @@
{
"url": "/api/data-tables/invoker",
"path": "/api/data-tables-invoker-api.jag"
+ },
+ {
+ "url": "/api/operation/*",
+ "path": "/api/operation-api.jag"
}
]
}
\ No newline at end of file
diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml
index f21c127d9d..90eb1dbd9c 100644
--- a/components/device-mgt/pom.xml
+++ b/components/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml
diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
index 238fadc87b..4f312273e3 100644
--- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
+++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtemail-sender
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml
diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml
index 8919f7e723..afff39f9fd 100644
--- a/components/email-sender/pom.xml
+++ b/components/email-sender/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml
diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml
index 20c88436e0..ac9cb5fb03 100644
--- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml
+++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml
@@ -21,14 +21,14 @@
dynamic-client-registrationorg.wso2.carbon.devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.mdmdynamic-client-web-proxy
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Proxy endpoint of Dynamic Client Registration Web ServiceWSO2 Carbon - Dynamic Client Registration Web Proxywar
diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml
index d87b87183e..ebbe891c31 100644
--- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml
+++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml
@@ -21,14 +21,14 @@
dynamic-client-registrationorg.wso2.carbon.devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.mdmdynamic-client-web
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Dynamic Client Registration Web ServiceWSO2 Carbon - Dynamic Client Registration Webwar
diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml
index 10d041d402..ff933a3899 100644
--- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml
+++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml
@@ -21,13 +21,13 @@
dynamic-client-registrationorg.wso2.carbon.devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.dynamic.client.registration
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - Dynamic client registration serviceWSO2 Carbon - Dynamic Client Registration Service
diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml
index f5ea0ab8c0..a569cb2644 100644
--- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml
+++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml
@@ -21,13 +21,13 @@
dynamic-client-registrationorg.wso2.carbon.devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.dynamic.client.web.app.registration
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - Dynamic client web app registrationWSO2 Carbon - Dynamic Client Web-app Registration Service
diff --git a/components/identity-extensions/dynamic-client-registration/pom.xml b/components/identity-extensions/dynamic-client-registration/pom.xml
index bf14dbc6f2..7873390006 100644
--- a/components/identity-extensions/dynamic-client-registration/pom.xml
+++ b/components/identity-extensions/dynamic-client-registration/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtidentity-extensions
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.devicemgtdynamic-client-registration
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Dynamic client registrationhttp://wso2.org
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
index 0463e37cbb..5889dfd175 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgtidentity-extensions
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.oauth.extensions
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - OAuth Extensionshttp://wso2.org
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/PermissionBasedScopeValidator.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/PermissionBasedScopeValidator.java
index 04fc9996cd..b4a5521e0b 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/PermissionBasedScopeValidator.java
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/validators/PermissionBasedScopeValidator.java
@@ -87,11 +87,11 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
if (userRealm != null && userRealm.getAuthorizationManager() != null) {
if (userStore != null) {
status = userRealm.getAuthorizationManager()
- .isUserAuthorized(userStore + "/" + username, permission.getPath(),
+ .isUserAuthorized(userStore + "/" + username, permission.getUrl(),
PermissionMethod.UI_EXECUTE);
} else {
status = userRealm.getAuthorizationManager()
- .isUserAuthorized(username, permission.getPath(), PermissionMethod.UI_EXECUTE);
+ .isUserAuthorized(username, permission.getUrl(), PermissionMethod.UI_EXECUTE);
}
}
}
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
index e3a7c44ba4..92515628a6 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
@@ -21,7 +21,7 @@
identity-extensionsorg.wso2.carbon.devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
index 9336e2f7a4..4563610081 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtidentity-extensions
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml
diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/service/JWTClientManagerServiceImpl.java b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/service/JWTClientManagerServiceImpl.java
index f12d295b7a..51c19212a3 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/service/JWTClientManagerServiceImpl.java
+++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/service/JWTClientManagerServiceImpl.java
@@ -81,7 +81,7 @@ public class JWTClientManagerServiceImpl implements JWTClientManagerService {
addJWTClient(tenantDomain, jwtClient);
} catch (JWTClientAlreadyExistsException e) {
log.warn("Attempting to register a jwt client for the tenant " + tenantDomain +
- " when one already exists. Returning existing jwt client");
+ " when one already exists. Returning existing jwt client", e);
return getJWTClient(tenantDomain);
} catch (JWTClientConfigurationException e) {
throw new JWTClientException("Failed to parse jwt configuration for tenant " + tenantDomain, e);
@@ -110,7 +110,7 @@ public class JWTClientManagerServiceImpl implements JWTClientManagerService {
addJWTClient(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, defaultJWTClient);
} catch (JWTClientAlreadyExistsException e) {
log.warn("Attempting to register a jwt client for the super tenant" +
- " when one already exists. Returning existing jwt client");
+ " when one already exists. Returning existing jwt client", e);
}
}
}
diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml
index e0092f1daf..0067e51968 100644
--- a/components/identity-extensions/pom.xml
+++ b/components/identity-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
index 32c743212e..14c5ebda5b 100644
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtpolicy-mgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.devicemgtorg.wso2.carbon.complex.policy.decision.point
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - Policy Decision PointWSO2 Carbon - Policy Decision Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
index 042f01b66b..285f251cbf 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
@@ -3,7 +3,7 @@
org.wso2.carbon.devicemgtpolicy-mgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml
@@ -11,7 +11,7 @@
4.0.0org.wso2.carbon.devicemgtorg.wso2.carbon.policy.information.point
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - Policy Information PointWSO2 Carbon - Policy Information Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
index b6f290adf2..cef9983588 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtpolicy-mgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.devicemgtorg.wso2.carbon.policy.mgt.common
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - Policy Management CommonWSO2 Carbon - Policy Management Common
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
index 9c72336e9f..9b70beb9e5 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtpolicy-mgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.devicemgtorg.wso2.carbon.policy.mgt.core
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - Policy Management CoreWSO2 Carbon - Policy Management Core
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java
index 4564e4ba5e..26d896886a 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java
@@ -22,6 +22,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.Feature;
+import org.wso2.carbon.device.mgt.common.InvalidDeviceException;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.policy.mgt.common.*;
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceData;
@@ -105,6 +106,10 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
PolicyManagementDataHolder.getInstance().getDeviceManagementService().addOperation(type,
PolicyManagerUtil.transformPolicy(policy), deviceIdentifiers);
return policy;
+ } catch (InvalidDeviceException e) {
+ String msg = "Error occurred while getting the effective policies for invalid DeviceIdentifiers";
+ log.error(msg, e);
+ throw new PolicyManagementException(msg, e);
} catch (PolicyEvaluationException e) {
String msg = "Error occurred while getting the effective policies from the PEP service for device " +
deviceIdentifier.getId() + " - " + deviceIdentifier.getType();
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/enforcement/PolicyEnforcementDelegatorImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/enforcement/PolicyEnforcementDelegatorImpl.java
index 675c0a39c4..4e2051e8b1 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/enforcement/PolicyEnforcementDelegatorImpl.java
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/enforcement/PolicyEnforcementDelegatorImpl.java
@@ -22,6 +22,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
+import org.wso2.carbon.device.mgt.common.InvalidDeviceException;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager;
import org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl;
@@ -100,6 +101,10 @@ public class PolicyEnforcementDelegatorImpl implements PolicyEnforcementDelegato
//ToDo Need to fix this to fetch OSGi service
OperationManager operationManager = new OperationManagerImpl();
operationManager.addOperation(PolicyManagerUtil.transformPolicy(policy), deviceIdentifiers);
+ } catch (InvalidDeviceException e) {
+ String msg = "Invalid DeviceIdentifiers found.";
+ log.error(msg, e);
+ throw new PolicyDelegationException(msg, e);
} catch (OperationManagementException e) {
String msg = "Error occurred while adding the operation to device.";
log.error(msg, e);
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java
index 1322834634..77c00033d4 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java
@@ -21,10 +21,7 @@ package org.wso2.carbon.policy.mgt.core.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.mgt.common.Device;
-import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
-import org.wso2.carbon.device.mgt.common.DeviceManagementException;
-import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
+import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.core.operation.mgt.PolicyOperation;
@@ -170,7 +167,8 @@ public class ComplianceDecisionPointImpl implements ComplianceDecisionPoint {
addOperation(type, policyOperation, deviceIdentifiers);
}
-
+ } catch (InvalidDeviceException e) {
+ throw new PolicyComplianceException("Invalid Device identifiers found.", e);
} catch (OperationManagementException e) {
throw new PolicyComplianceException("Error occurred while re-enforcing the policy to device " + deviceIdentifier.getId() + " - " +
deviceIdentifier.getType(), e);
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java
index ba63452b90..a80bd46219 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java
@@ -25,6 +25,7 @@ import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
+import org.wso2.carbon.device.mgt.common.InvalidDeviceException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
@@ -354,6 +355,8 @@ public class MonitoringManagerImpl implements MonitoringManager {
if (!deviceIdsToAddOperation.isEmpty()) {
try {
this.addMonitoringOperationsToDatabase(new ArrayList<>(deviceIdsToAddOperation.values()));
+ } catch (InvalidDeviceException e) {
+ throw new PolicyComplianceException("Invalid Device Identifiers found.", e);
} catch (OperationManagementException e) {
throw new PolicyComplianceException("Error occurred while adding monitoring operation to devices", e);
}
@@ -387,7 +390,7 @@ public class MonitoringManagerImpl implements MonitoringManager {
}
private void addMonitoringOperationsToDatabase(List devices)
- throws PolicyComplianceException, OperationManagementException {
+ throws PolicyComplianceException, OperationManagementException, InvalidDeviceException {
List deviceIdentifiers = this.getDeviceIdentifiersFromDevices(devices);
CommandOperation monitoringOperation = new CommandOperation();
diff --git a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml
index aefb36c6f0..52cea36999 100644
--- a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml
@@ -3,14 +3,14 @@
org.wso2.carbon.devicemgtpolicy-mgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.devicemgtorg.wso2.carbon.simple.policy.decision.point
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - Simple Policy Decision PointWSO2 Carbon - Simple Policy Decision Point
diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml
index 895218d930..5ce65de176 100644
--- a/components/policy-mgt/pom.xml
+++ b/components/policy-mgt/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0policy-mgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Policy Management Componenthttp://wso2.org
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
index 499996b031..df22278f3a 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgtwebapp-authenticator-framework
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.devicemgtorg.wso2.carbon.webapp.authenticator.framework
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTbundleWSO2 Carbon - Web Application Authenticator Framework BundleWSO2 Carbon - Web Application Authenticator Framework Bundle
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/Utils/Utils.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/Utils/Utils.java
index 9632649277..163e8287fe 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/Utils/Utils.java
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/Utils/Utils.java
@@ -23,6 +23,10 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.context.PrivilegedCarbonContext;
+import org.wso2.carbon.device.mgt.common.permission.mgt.Permission;
+import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagementException;
+import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagerService;
+import org.wso2.carbon.device.mgt.core.permission.mgt.PermissionManagerServiceImpl;
import org.wso2.carbon.identity.core.util.IdentityTenantUtil;
import org.wso2.carbon.user.api.TenantManager;
import org.wso2.carbon.user.api.UserStoreException;
@@ -30,9 +34,17 @@ import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
import org.wso2.carbon.webapp.authenticator.framework.AuthenticationException;
+import java.util.Properties;
+
public class Utils {
private static final Log log = LogFactory.getLog(Utils.class);
+ private static PermissionManagerService permissionManagerService = PermissionManagerServiceImpl.getInstance();
+ private static Properties properties;
+ private static Permission permission;
+
+ public static final String URL_PROPERTY = "URL";
+ public static final String HTTP_METHOD_PROPERTY = "HTTP_METHOD";
public static int getTenantIdOFUser(String username) throws AuthenticationException {
int tenantId = 0;
@@ -74,4 +86,15 @@ public class Utils {
}
}
+ public static String getResourceUri(String url, String httpMethod) throws PermissionManagementException {
+ properties = new Properties();
+ properties.put(URL_PROPERTY, url);
+ properties.put(HTTP_METHOD_PROPERTY, httpMethod);
+ permission = permissionManagerService.getPermission(properties);
+ if (permission != null) {
+ return permission.getContext() + "/1.0.0/1.0.0" + permission.getUrlTemplate() + ":" + permission.getMethod();
+ }
+ return null;
+ }
+
}
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/OAuthAuthenticator.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/OAuthAuthenticator.java
index bbeab152a3..f6169eace9 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/OAuthAuthenticator.java
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/OAuthAuthenticator.java
@@ -23,6 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.MessageBytes;
+import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagementException;
import org.wso2.carbon.webapp.authenticator.framework.AuthenticationException;
import org.wso2.carbon.webapp.authenticator.framework.AuthenticationFrameworkUtil;
import org.wso2.carbon.webapp.authenticator.framework.AuthenticationInfo;
@@ -105,7 +106,7 @@ public class OAuthAuthenticator implements WebappAuthenticator {
StringTokenizer tokenizer = new StringTokenizer(requestUri, "/");
String context = tokenizer.nextToken();
- if ((context == null) || ("".equals(context))) {
+ if ((context == null) || (context.isEmpty())) {
authenticationInfo.setStatus(WebappAuthenticator.Status.CONTINUE);
}
String apiVersion = tokenizer.nextToken();
@@ -120,7 +121,17 @@ public class OAuthAuthenticator implements WebappAuthenticator {
} else {
String bearerToken = getBearerToken(request);
- String resource = requestUri + ":" + requestMethod;
+ int urlParamIndex = requestUri.indexOf('?');
+ if(urlParamIndex > 0) {
+ requestUri = requestUri.substring(0, urlParamIndex);
+ }
+ String resource = Utils.getResourceUri(requestUri, requestMethod);
+
+ if (resource == null || resource.isEmpty()) {
+ authenticationInfo.setStatus(Status.FAILURE);
+ authenticationInfo.setMessage("Authorization failed. Requested API resource does not exist");
+ return authenticationInfo;
+ }
OAuthValidationResponse oAuthValidationResponse =
this.tokenValidator.validateToken(bearerToken, resource);
@@ -142,6 +153,8 @@ public class OAuthAuthenticator implements WebappAuthenticator {
log.error("Failed to authenticate the incoming request", e);
} catch (OAuthTokenValidationException e) {
log.error("Failed to authenticate the incoming request due to oauth token validation error.", e);
+ } catch (PermissionManagementException e) {
+ log.error("Failed to authenticate the incoming request due to error in permission initialization", e);
}
return authenticationInfo;
}
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/PermissionAuthorizer.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/PermissionAuthorizer.java
index 6d5138d3a2..c17d6fcc6a 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/PermissionAuthorizer.java
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/PermissionAuthorizer.java
@@ -42,56 +42,7 @@ public class PermissionAuthorizer {
public WebappAuthenticator.Status authorize(Request request, Response response) {
- String requestUri = request.getRequestURI();
- String requestMethod = request.getMethod();
-
- if (requestUri == null || requestUri.isEmpty() || requestMethod == null || requestMethod.isEmpty()) {
- return WebappAuthenticator.Status.CONTINUE;
- }
-
- PermissionManagerServiceImpl registryBasedPermissionManager = PermissionManagerServiceImpl.getInstance();
- Properties properties = new Properties();
- properties.put("",requestUri);
- properties.put("",requestMethod);
- Permission requestPermission = null;
- try {
- requestPermission = registryBasedPermissionManager.getPermission(properties);
- } catch (PermissionManagementException e) {
- log.error(
- "Error occurred while fetching the permission for URI : " + Encode.forJava(requestUri) + " ," +
- " METHOD : " + requestMethod + ", msg = " + e.getMessage());
- }
-
- if (requestPermission == null) {
- if (log.isDebugEnabled()) {
- log.debug("Permission to request '" + Encode.forJava(requestUri) + "' is not defined in the configuration");
- }
- return WebappAuthenticator.Status.FAILURE;
- }
-
- String permissionString = requestPermission.getPath();
-
- // This is added temporarily until authentication works.
- // TODO remove below line.
- String username = "admin";
- // TODO uncomment this once the authentication works.
- //String username = CarbonContext.getThreadLocalCarbonContext().getUsername();
-
- boolean isUserAuthorized;
- try {
- isUserAuthorized = CarbonContext.getThreadLocalCarbonContext().getUserRealm().
- getAuthorizationManager().isUserAuthorized(username, permissionString,
- Constants.PermissionMethod.READ);
- } catch (UserStoreException e) {
- log.error("Error occurred while retrieving user store. " + e.getMessage());
- return WebappAuthenticator.Status.FAILURE;
- }
-
- if (isUserAuthorized) {
- return WebappAuthenticator.Status.SUCCESS;
- } else {
- return WebappAuthenticator.Status.FAILURE;
- }
+ return WebappAuthenticator.Status.SUCCESS;
}
}
diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml
index a4508f3193..373b032daf 100644
--- a/components/webapp-authenticator-framework/pom.xml
+++ b/components/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0org.wso2.carbon.devicemgtwebapp-authenticator-framework
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Webapp Authenticator Frameworkhttp://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
index ec5779c3e0..d8cde70f60 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgtapimgt-extensions-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.apimgt.application.extension.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - API Management Application Extension Featurehttp://wso2.orgThis feature contains an implementation of a api application registration, which takes care of subscription
@@ -111,7 +111,7 @@
org.wso2.carbon.p2.category.type:server
- org.eclipse.equinox.p2.type.group:false
+ org.eclipse.equinox.p2.type.group:true
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
index a78b72da69..2245df14c9 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgtapimgt-extensions-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.apimgt.webapp.publisher.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - API Management Webapp Publisher Featurehttp://wso2.orgThis feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing
diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml
index 88ff4cff42..5120bd58d9 100644
--- a/features/apimgt-extensions/pom.xml
+++ b/features/apimgt-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0org.wso2.carbon.devicemgtapimgt-extensions-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - API Management Extensions Featurehttp://wso2.org
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
index 41c8151b5c..158f42c616 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtcertificate-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
index b76c8a7462..d0e9fbbfcd 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtcertificate-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
index 2f7234005d..cdbb0943e9 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtcertificate-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.certificate.mgt.server.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Certificate Management Server Featurehttp://wso2.orgThis feature contains the core bundles required for back-end Certificate Management functionality
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf/certificate-config.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf/certificate-config.xml
index e19786b861..0cc4bd6f8c 100755
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf/certificate-config.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf/certificate-config.xml
@@ -16,4 +16,14 @@
racert
+
+
+
+
+ jdbc/DM_DS
+
+
+
+
+ 10
\ No newline at end of file
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/h2.sql b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/h2.sql
similarity index 100%
rename from features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/h2.sql
rename to features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/h2.sql
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/mssql.sql b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/mssql.sql
similarity index 100%
rename from features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/mssql.sql
rename to features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/mssql.sql
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/mysql.sql b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/mysql.sql
similarity index 100%
rename from features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/mysql.sql
rename to features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/mysql.sql
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/oracle.sql b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/oracle.sql
similarity index 100%
rename from features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/oracle.sql
rename to features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/oracle.sql
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/postgresql.sql b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/postgresql.sql
similarity index 100%
rename from features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/cdm/certs/postgresql.sql
rename to features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/dbscripts/certMgt/postgresql.sql
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
index 44e5960b63..ef6d64fc87 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
@@ -1,4 +1,4 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/conf/wso2certs.jks,target:${installFolder}/../../resources/security/wso2certs.jks,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/conf/certificate-config.xml,target:${installFolder}/../../conf/certificate-config.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/dbscripts/cdm/,target:${installFolder}/../../../dbscripts/cdm,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts,overwrite:true);\
\ No newline at end of file
diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml
index 69705b0013..5eb697873b 100644
--- a/features/certificate-mgt/pom.xml
+++ b/features/certificate-mgt/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0org.wso2.carbon.devicemgtcertificate-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Certificate Management Featurehttp://wso2.org
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml
index 2c108168d4..8177900a20 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtdevice-mgt-extensions-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - GCM Based Push Notification Provider Featurehttp://wso2.orgWSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
index 5c79e5967e..17634494ec 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtdevice-mgt-extensions-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - MQTT Based Push Notification Provider Featurehttp://wso2.orgWSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
index 0760242826..fcfe791cb9 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtdevice-mgt-extensions-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - XMPP Based Push Notification Provider Featurehttp://wso2.orgWSO2 Carbon - XMPP Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml
index f5ce99fa43..1e926bc74f 100644
--- a/features/device-mgt-extensions/pom.xml
+++ b/features/device-mgt-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml
index fe8ef48449..c87799c606 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml
@@ -3,13 +3,13 @@
org.wso2.carbon.devicemgtdevice-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.analytics.dashboard.feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Device Management Dashboard Analytics FeatureWSO2 Carbon - Device Management Dashboard Analytics Feature
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
index 2fd5026746..6ea9448aca 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtdevice-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.analytics.data.publisher.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Device Management Server Featurehttp://wso2.orgThis feature contains bundles related to device analytics data publisher
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
index 628f54c55e..6ce3591a5b 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtdevice-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
index e74e9db2d8..fbee9b266b 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
@@ -4,14 +4,14 @@
org.wso2.carbon.devicemgtdevice-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.extensions.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Device Management Extensions Featurehttp://wso2.orgThis feature contains common extensions used by key device management functionalities
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
index 0f6bb5f79d..872f5652f2 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtdevice-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
index a0bc1141e8..3cd0fd48c0 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtdevice-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.server.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Device Management Server Featurehttp://wso2.orgThis feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/cdm-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/cdm-config.xml
index bf6e3787b1..84af906872 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/cdm-config.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/cdm-config.xml
@@ -62,6 +62,7 @@
+
2020
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql
index 8d1ddb215d..9c122d0764 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql
@@ -5,7 +5,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE (
SHARED_WITH_ALL_TENANTS BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (ID)
)ENGINE = InnoDB;
-CREATE INDEX device_type_name ON DM_DEVICE_TYPE (NAME);
+
+CREATE INDEX IDX_DEVICE_TYPE ON DM_DEVICE_TYPE (NAME);
CREATE TABLE IF NOT EXISTS DM_DEVICE (
ID INTEGER AUTO_INCREMENT NOT NULL,
@@ -20,17 +21,17 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE (
REFERENCES DM_DEVICE_TYPE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
+CREATE INDEX IDX_DM_DEVICE ON DM_DEVICE(TENANT_ID, DEVICE_TYPE_ID);
CREATE TABLE IF NOT EXISTS DM_OPERATION (
ID INTEGER AUTO_INCREMENT NOT NULL,
- TYPE VARCHAR(50) NOT NULL,
+ TYPE VARCHAR(20) NOT NULL,
CREATED_TIMESTAMP TIMESTAMP NOT NULL,
RECEIVED_TIMESTAMP TIMESTAMP NULL,
- OPERATION_CODE VARCHAR(1000) NOT NULL,
+ OPERATION_CODE VARCHAR(50) NOT NULL,
PRIMARY KEY (ID)
)ENGINE = InnoDB;
-
CREATE TABLE IF NOT EXISTS DM_CONFIG_OPERATION (
OPERATION_ID INTEGER NOT NULL,
OPERATION_CONFIG BLOB DEFAULT NULL,
@@ -39,7 +40,6 @@ CREATE TABLE IF NOT EXISTS DM_CONFIG_OPERATION (
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
-
CREATE TABLE IF NOT EXISTS DM_COMMAND_OPERATION (
OPERATION_ID INTEGER NOT NULL,
ENABLED BOOLEAN NOT NULL DEFAULT FALSE,
@@ -48,7 +48,6 @@ CREATE TABLE IF NOT EXISTS DM_COMMAND_OPERATION (
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
-
CREATE TABLE IF NOT EXISTS DM_POLICY_OPERATION (
OPERATION_ID INTEGER NOT NULL,
ENABLED INTEGER NOT NULL DEFAULT 0,
@@ -58,7 +57,6 @@ CREATE TABLE IF NOT EXISTS DM_POLICY_OPERATION (
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
-
CREATE TABLE IF NOT EXISTS DM_PROFILE_OPERATION (
OPERATION_ID INTEGER NOT NULL,
ENABLED INTEGER NOT NULL DEFAULT 0,
@@ -68,7 +66,6 @@ CREATE TABLE IF NOT EXISTS DM_PROFILE_OPERATION (
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
-
CREATE TABLE IF NOT EXISTS DM_ENROLMENT (
ID INTEGER AUTO_INCREMENT NOT NULL,
DEVICE_ID INTEGER NOT NULL,
@@ -83,6 +80,8 @@ CREATE TABLE IF NOT EXISTS DM_ENROLMENT (
DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
+CREATE INDEX IDX_ENROLMENT_FK_DEVICE_ID ON DM_ENROLMENT(DEVICE_ID);
+CREATE INDEX IDX_ENROLMENT_DEVICE_ID_TENANT_ID ON DM_ENROLMENT(DEVICE_ID, TENANT_ID);
CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING (
ID INTEGER AUTO_INCREMENT NOT NULL,
@@ -92,12 +91,18 @@ CREATE TABLE IF NOT EXISTS DM_ENROLMENT_OP_MAPPING (
CREATED_TIMESTAMP INTEGER NOT NULL,
UPDATED_TIMESTAMP INTEGER NOT NULL,
PRIMARY KEY (ID),
+ KEY `fk_dm_device_operation_mapping_operation` (`OPERATION_ID`),
+ KEY `IDX_DM_ENROLMENT_OP_MAPPING` (`ENROLMENT_ID`,`OPERATION_ID`),
+ KEY `ID_DM_ENROLMENT_OP_MAPPING_UPDATED_TIMESTAMP` (`UPDATED_TIMESTAMP`),
CONSTRAINT fk_dm_device_operation_mapping_device FOREIGN KEY (ENROLMENT_ID) REFERENCES
DM_ENROLMENT (ID) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT fk_dm_device_operation_mapping_operation FOREIGN KEY (OPERATION_ID) REFERENCES
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
+CREATE INDEX IDX_ENROLMENT_OP_MAPPING ON DM_ENROLMENT_OP_MAPPING (UPDATED_TIMESTAMP);
+CREATE INDEX IDX_EN_OP_MAPPING_EN_ID ON DM_ENROLMENT_OP_MAPPING(ENROLMENT_ID);
+CREATE INDEX IDX_EN_OP_MAPPING_OP_ID ON DM_ENROLMENT_OP_MAPPING(OPERATION_ID);
CREATE TABLE IF NOT EXISTS DM_DEVICE_OPERATION_RESPONSE (
ID INTEGER AUTO_INCREMENT NOT NULL,
@@ -112,6 +117,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_OPERATION_RESPONSE (
DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
)ENGINE = InnoDB;
+CREATE INDEX IDX_ENID_OPID ON DM_DEVICE_OPERATION_RESPONSE(OPERATION_ID, ENROLMENT_ID);
+
-- POLICY RELATED TABLES ---
CREATE TABLE IF NOT EXISTS DM_PROFILE (
@@ -583,18 +590,4 @@ DM_DEVICE.DEVICE_TYPE_ID = DM_DEVICE_TYPE.ID AND
DM_DEVICE.ID = DM_DEVICE_DETAIL.DEVICE_ID
ORDER BY TENANT_ID, DEVICE_ID;
--- END OF DASHBOARD RELATED VIEWS --
-
--- CERTIFICATES TABLES --
-
-CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE (
- ID INTEGER auto_increment NOT NULL,
- SERIAL_NUMBER VARCHAR(500) DEFAULT NULL,
- CERTIFICATE BLOB DEFAULT NULL,
- TENANT_ID INTEGER DEFAULT 0,
- USERNAME VARCHAR(500) DEFAULT NULL,
- PRIMARY KEY (ID)
-)ENGINE = InnoDB;
-
--- END CERTIFICATES TABLES --
-
+-- END OF DASHBOARD RELATED VIEWS --
\ No newline at end of file
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql
index 0b1256d5ee..8c98587ffe 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql
@@ -7,16 +7,16 @@ CREATE TABLE DM_DEVICE_TYPE (
)
/
-- Generate ID using sequence and trigger
-CREATE SEQUENCE DM_DEVICE_TYPE_seq START WITH 1 INCREMENT BY 1 NOCACHE
+CREATE SEQUENCE DM_DEVICE_TYPE_id_seq START WITH 1 INCREMENT BY 1 NOCACHE
/
-CREATE OR REPLACE TRIGGER DM_DEVICE_TYPE_seq_tr
+CREATE OR REPLACE TRIGGER DM_DEVICE_TYPE_id_seq_tr
BEFORE INSERT
ON DM_DEVICE_TYPE
REFERENCING NEW AS NEW
FOR EACH ROW
WHEN (NEW.ID IS NULL)
BEGIN
- SELECT DM_DEVICE_TYPE_seq.NEXTVAL INTO :NEW.ID FROM DUAL;
+ SELECT DM_DEVICE_TYPE_id_seq.NEXTVAL INTO :NEW.ID FROM DUAL;
END;
/
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
index 39b193258c..8c47ed7af4 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtdevice-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml
diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml
index 7647a97583..dbdfaefff1 100644
--- a/features/device-mgt/pom.xml
+++ b/features/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml
diff --git a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml
index a591217aee..dd3df3f778 100644
--- a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml
+++ b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgtdynamic-client-registration-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.dynamic.client.registration.server.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Dynamic Client Registration Server Featurehttp://wso2.orgThis feature contains dynamic client registration features
@@ -127,7 +127,7 @@
org.wso2.carbon.p2.category.type:server
- org.eclipse.equinox.p2.type.group:false
+ org.eclipse.equinox.p2.type.group:true
diff --git a/features/dynamic-client-registration/pom.xml b/features/dynamic-client-registration/pom.xml
index 84536e63ac..43bcc9a6c3 100644
--- a/features/dynamic-client-registration/pom.xml
+++ b/features/dynamic-client-registration/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0org.wso2.carbon.devicemgtdynamic-client-registration-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Dynamic Client Registration Featurehttp://wso2.org
diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
index 83b2bfd1f7..e072a5f50b 100644
--- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
+++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtemail-sender-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.email.sender.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Email Sender Featurehttp://wso2.orgThis feature contains the core bundles required for email sender related functionality
diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml
index baa300a43f..c29b8a6a1a 100644
--- a/features/email-sender/pom.xml
+++ b/features/email-sender/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0org.wso2.carbon.devicemgtemail-sender-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Email Sender Featurehttp://wso2.org
diff --git a/features/etc/feature.properties b/features/etc/feature.properties
new file mode 100644
index 0000000000..a84f4e33e9
--- /dev/null
+++ b/features/etc/feature.properties
@@ -0,0 +1,241 @@
+################################################################################
+# Copyright 2015 WSO2, Inc. (http://wso2.com)
+#
+# WSO2 Inc. Licensed 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.
+################################################################################
+
+providerName=WSO2 Inc.
+
+########################## license properties ##################################
+licenseURL=http://www.apache.org/licenses/LICENSE-2.0
+
+license=\
+ Apache License\n\
+ Version 2.0, January 2004\n\
+ http://www.apache.org/licenses/\n\
+\n\
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\
+\n\
+ 1. Definitions.\n\
+\n\
+ "License" shall mean the terms and conditions for use, reproduction,\n\
+ and distribution as defined by Sections 1 through 9 of this document.\n\
+\n\
+ "Licensor" shall mean the copyright owner or entity authorized by\n\
+ the copyright owner that is granting the License.\n\
+\n\
+ "Legal Entity" shall mean the union of the acting entity and all\n\
+ other entities that control, are controlled by, or are under common\n\
+ control with that entity. For the purposes of this definition,\n\
+ "control" means (i) the power, direct or indirect, to cause the\n\
+ direction or management of such entity, whether by contract or\n\
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the\n\
+ outstanding shares, or (iii) beneficial ownership of such entity.\n\
+\n\
+ "You" (or "Your") shall mean an individual or Legal Entity\n\
+ exercising permissions granted by this License.\n\
+\n\
+ "Source" form shall mean the preferred form for making modifications,\n\
+ including but not limited to software source code, documentation\n\
+ source, and configuration files.\n\
+\n\
+ "Object" form shall mean any form resulting from mechanical\n\
+ transformation or translation of a Source form, including but\n\
+ not limited to compiled object code, generated documentation,\n\
+ and conversions to other media types.\n\
+\n\
+ "Work" shall mean the work of authorship, whether in Source or\n\
+ Object form, made available under the License, as indicated by a\n\
+ copyright notice that is included in or attached to the work\n\
+ (an example is provided in the Appendix below).\n\
+\n\
+ "Derivative Works" shall mean any work, whether in Source or Object\n\
+ form, that is based on (or derived from) the Work and for which the\n\
+ editorial revisions, annotations, elaborations, or other modifications\n\
+ represent, as a whole, an original work of authorship. For the purposes\n\
+ of this License, Derivative Works shall not include works that remain\n\
+ separable from, or merely link (or bind by name) to the interfaces of,\n\
+ the Work and Derivative Works thereof.\n\
+\n\
+ "Contribution" shall mean any work of authorship, including\n\
+ the original version of the Work and any modifications or additions\n\
+ to that Work or Derivative Works thereof, that is intentionally\n\
+ submitted to Licensor for inclusion in the Work by the copyright owner\n\
+ or by an individual or Legal Entity authorized to submit on behalf of\n\
+ the copyright owner. For the purposes of this definition, "submitted"\n\
+ means any form of electronic, verbal, or written communication sent\n\
+ to the Licensor or its representatives, including but not limited to\n\
+ communication on electronic mailing lists, source code control systems,\n\
+ and issue tracking systems that are managed by, or on behalf of, the\n\
+ Licensor for the purpose of discussing and improving the Work, but\n\
+ excluding communication that is conspicuously marked or otherwise\n\
+ designated in writing by the copyright owner as "Not a Contribution."\n\
+\n\
+ "Contributor" shall mean Licensor and any individual or Legal Entity\n\
+ on behalf of whom a Contribution has been received by Licensor and\n\
+ subsequently incorporated within the Work.\n\
+\n\
+ 2. Grant of Copyright License. Subject to the terms and conditions of\n\
+ this License, each Contributor hereby grants to You a perpetual,\n\
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n\
+ copyright license to reproduce, prepare Derivative Works of,\n\
+ publicly display, publicly perform, sublicense, and distribute the\n\
+ Work and such Derivative Works in Source or Object form.\n\
+\n\
+ 3. Grant of Patent License. Subject to the terms and conditions of\n\
+ this License, each Contributor hereby grants to You a perpetual,\n\
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n\
+ (except as stated in this section) patent license to make, have made,\n\
+ use, offer to sell, sell, import, and otherwise transfer the Work,\n\
+ where such license applies only to those patent claims licensable\n\
+ by such Contributor that are necessarily infringed by their\n\
+ Contribution(s) alone or by combination of their Contribution(s)\n\
+ with the Work to which such Contribution(s) was submitted. If You\n\
+ institute patent litigation against any entity (including a\n\
+ cross-claim or counterclaim in a lawsuit) alleging that the Work\n\
+ or a Contribution incorporated within the Work constitutes direct\n\
+ or contributory patent infringement, then any patent licenses\n\
+ granted to You under this License for that Work shall terminate\n\
+ as of the date such litigation is filed.\n\
+\n\
+ 4. Redistribution. You may reproduce and distribute copies of the\n\
+ Work or Derivative Works thereof in any medium, with or without\n\
+ modifications, and in Source or Object form, provided that You\n\
+ meet the following conditions:\n\
+\n\
+ (a) You must give any other recipients of the Work or\n\
+ Derivative Works a copy of this License; and\n\
+\n\
+ (b) You must cause any modified files to carry prominent notices\n\
+ stating that You changed the files; and\n\
+\n\
+ (c) You must retain, in the Source form of any Derivative Works\n\
+ that You distribute, all copyright, patent, trademark, and\n\
+ attribution notices from the Source form of the Work,\n\
+ excluding those notices that do not pertain to any part of\n\
+ the Derivative Works; and\n\
+\n\
+ (d) If the Work includes a "NOTICE" text file as part of its\n\
+ distribution, then any Derivative Works that You distribute must\n\
+ include a readable copy of the attribution notices contained\n\
+ within such NOTICE file, excluding those notices that do not\n\
+ pertain to any part of the Derivative Works, in at least one\n\
+ of the following places: within a NOTICE text file distributed\n\
+ as part of the Derivative Works; within the Source form or\n\
+ documentation, if provided along with the Derivative Works; or,\n\
+ within a display generated by the Derivative Works, if and\n\
+ wherever such third-party notices normally appear. The contents\n\
+ of the NOTICE file are for informational purposes only and\n\
+ do not modify the License. You may add Your own attribution\n\
+ notices within Derivative Works that You distribute, alongside\n\
+ or as an addendum to the NOTICE text from the Work, provided\n\
+ that such additional attribution notices cannot be construed\n\
+ as modifying the License.\n\
+\n\
+ You may add Your own copyright statement to Your modifications and\n\
+ may provide additional or different license terms and conditions\n\
+ for use, reproduction, or distribution of Your modifications, or\n\
+ for any such Derivative Works as a whole, provided Your use,\n\
+ reproduction, and distribution of the Work otherwise complies with\n\
+ the conditions stated in this License.\n\
+\n\
+ 5. Submission of Contributions. Unless You explicitly state otherwise,\n\
+ any Contribution intentionally submitted for inclusion in the Work\n\
+ by You to the Licensor shall be under the terms and conditions of\n\
+ this License, without any additional terms or conditions.\n\
+ Notwithstanding the above, nothing herein shall supersede or modify\n\
+ the terms of any separate license agreement you may have executed\n\
+ with Licensor regarding such Contributions.\n\
+\n\
+ 6. Trademarks. This License does not grant permission to use the trade\n\
+ names, trademarks, service marks, or product names of the Licensor,\n\
+ except as required for reasonable and customary use in describing the\n\
+ origin of the Work and reproducing the content of the NOTICE file.\n\
+\n\
+ 7. Disclaimer of Warranty. Unless required by applicable law or\n\
+ agreed to in writing, Licensor provides the Work (and each\n\
+ Contributor provides its Contributions) on an "AS IS" BASIS,\n\
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n\
+ implied, including, without limitation, any warranties or conditions\n\
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n\
+ PARTICULAR PURPOSE. You are solely responsible for determining the\n\
+ appropriateness of using or redistributing the Work and assume any\n\
+ risks associated with Your exercise of permissions under this License.\n\
+\n\
+ 8. Limitation of Liability. In no event and under no legal theory,\n\
+ whether in tort (including negligence), contract, or otherwise,\n\
+ unless required by applicable law (such as deliberate and grossly\n\
+ negligent acts) or agreed to in writing, shall any Contributor be\n\
+ liable to You for damages, including any direct, indirect, special,\n\
+ incidental, or consequential damages of any character arising as a\n\
+ result of this License or out of the use or inability to use the\n\
+ Work (including but not limited to damages for loss of goodwill,\n\
+ work stoppage, computer failure or malfunction, or any and all\n\
+ other commercial damages or losses), even if such Contributor\n\
+ has been advised of the possibility of such damages.\n\
+\n\
+ 9. Accepting Warranty or Additional Liability. While redistributing\n\
+ the Work or Derivative Works thereof, You may choose to offer,\n\
+ and charge a fee for, acceptance of support, warranty, indemnity,\n\
+ or other liability obligations and/or rights consistent with this\n\
+ License. However, in accepting such obligations, You may act only\n\
+ on Your own behalf and on Your sole responsibility, not on behalf\n\
+ of any other Contributor, and only if You agree to indemnify,\n\
+ defend, and hold each Contributor harmless for any liability\n\
+ incurred by, or claims asserted against, such Contributor by reason\n\
+ of your accepting any such warranty or additional liability.\n\
+\n\
+ END OF TERMS AND CONDITIONS\n\
+\n\
+ APPENDIX: How to apply the Apache License to your work.\n\
+\n\
+ To apply the Apache License to your work, attach the following\n\
+ boilerplate notice, with the fields enclosed by brackets "[]"\n\
+ replaced with your own identifying information. (Don't include\n\
+ the brackets!) The text should be enclosed in the appropriate\n\
+ comment syntax for the file format. We also recommend that a\n\
+ file or class name and description of purpose be included on the\n\
+ same "printed page" as the copyright notice for easier\n\
+ identification within third-party archives.\n\
+\n\
+ Copyright [yyyy] [name of copyright owner]\n\
+\n\
+ Licensed under the Apache License, Version 2.0 (the "License");\n\
+ you may not use this file except in compliance with the License.\n\
+ You may obtain a copy of the License at\n\
+\n\
+ http://www.apache.org/licenses/LICENSE-2.0\n\
+\n\
+ Unless required by applicable law or agreed to in writing, software\n\
+ distributed under the License is distributed on an "AS IS" BASIS,\n\
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
+ See the License for the specific language governing permissions and\n\
+ limitations under the License.\n
+
+######################### copyright properties #################################
+copyrightURL=TODO
+
+copyright=\
+Copyright (c) WSO2 Inc. (http://wso2.com)\n\
+\n\
+WSO2 Inc. Licensed under the Apache License, Version 2.0 (the "License");\n\
+you may not use this file except in compliance with the License.\n\
+You may obtain a copy of the License at\n\
+\n\
+http://www.apache.org/licenses/LICENSE-2.0\n\
+\n\
+Unless required by applicable law or agreed to in writing, software\n\
+distributed under the License is distributed on an "AS IS" BASIS,\n\
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
+See the License for the specific language governing permissions and\n\
+limitations under the License.\n
diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
index 744767aecc..f53deac6a2 100644
--- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
+++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgtjwt-client-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.identity.jwt.client.extension.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - JWT Client Featurehttp://wso2.orgThis feature contains jwt client implementation from which we can get a access token using the jwt
diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml
index 8d8ab3b599..d24c170e2a 100644
--- a/features/jwt-client/pom.xml
+++ b/features/jwt-client/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0jwt-client-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Dynamic Client Registration Featurehttp://wso2.org
diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
index 54a23aed26..81e2544311 100644
--- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
+++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgtoauth-extensions-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.device.mgt.oauth.extensions.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Device Mgt OAuth Extensions Featurehttp://wso2.orgThis feature contains devicemgt related OAuth extensions
diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml
index bffb8bdd14..7a92924b20 100644
--- a/features/oauth-extensions/pom.xml
+++ b/features/oauth-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0org.wso2.carbon.devicemgtoauth-extensions-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Device Management OAuth Extensions Featurehttp://wso2.org
diff --git a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
index 1d8a462d4d..02734f4d69 100644
--- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
+++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgtpolicy-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.policy.mgt.server.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Policy Management Server Featurehttp://wso2.orgThis feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml
index d8b55ee1d2..169b16c123 100644
--- a/features/policy-mgt/pom.xml
+++ b/features/policy-mgt/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0org.wso2.carbon.devicemgtpolicy-mgt-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Policy Management Featurehttp://wso2.org
diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
index c5af460171..313584066d 100644
--- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
+++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtwebapp-authenticator-framework-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../pom.xml4.0.0org.wso2.carbon.webapp.authenticator.framework.server.featurepom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Device Management Server Featurehttp://wso2.orgThis feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml
index 5978838b48..e5bf8a0a0f 100644
--- a/features/webapp-authenticator-framework/pom.xml
+++ b/features/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgtcarbon-devicemgt
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT../../pom.xml4.0.0org.wso2.carbon.devicemgtwebapp-authenticator-framework-feature
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTpomWSO2 Carbon - Webapp Authenticator Framework Featurehttp://wso2.org
diff --git a/pom.xml b/pom.xml
index 33bd3c298a..0b9c1c7305 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgtcarbon-devicemgtpom
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOTWSO2 Carbon - Device Management - Parenthttp://wso2.orgWSO2 Connected Device Manager Components
@@ -1794,7 +1794,7 @@
1.2.11.wso2v5
- 1.1.2-SNAPSHOT
+ 1.1.3-SNAPSHOT4.4.8