Please click "Add Another Role", if you wish to add another role or click
"View Role List" to complete the process and go back to the role list.
-
+
@@ -136,8 +137,8 @@
-
-
+
+
{{else}}
Permission Denied
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/create.js
index ca91072d12..77ff1d04f5 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/create.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/create.js
@@ -18,7 +18,7 @@
/**
* 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 displayData object that returns the dynamic state of this page to be presented
*/
@@ -38,6 +38,7 @@ function onRequest(context) {
if (userModule.isAuthorized("/permission/admin/device-mgt/users/view")) {
displayData.canViewUsers = true;
}
+ displayData.isCloud = deviceMgtProps.isCloud;
return displayData;
}
\ 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.role.create/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/public/js/bottomJs.js
index 2cb8292af7..e070c05835 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/public/js/bottomJs.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.role.create/public/js/bottomJs.js
@@ -33,6 +33,8 @@ var clearInline = {};
var apiBasePath = "/api/device-mgt/v1.0";
var domain = $("#domain").val();
+var isCloud = $("#role-create-form").data("cloud");
+
var enableInlineError = function (inputField, errorMsg, errorSign) {
var fieldIdentifier = "#" + inputField;
@@ -84,18 +86,18 @@ clearInline["role-name"] = function () {
validateInline["role-name"] = function () {
var roleNameInput = $("input#roleName");
var roleName = roleNameInput.val();
- if (inputIsValid( roleNameInput.data("regex"), roleName) && roleName.indexOf("@") < 0 && roleName.indexOf("/") < 0) {
+ if (inputIsValid(roleNameInput.data("regex"), roleName) && roleName.indexOf("@") < 0 && roleName.indexOf("/") < 0) {
disableInlineError("roleNameField", "roleNameEmpty", "roleNameError");
} else {
enableInlineError("roleNameField", "roleNameEmpty", "roleNameError");
}
};
-function formatRepo (user) {
+function formatRepo(user) {
if (user.loading) {
return user.text
}
- if (!user.username){
+ if (!user.username) {
return;
}
var markup = '