diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs
index 5bc33e4377..ad4c096949 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs
@@ -80,7 +80,7 @@
-
-
-
-
-
-
-
- Select sharing roles
-
-
-
- {{#if permissions.CREATE_GROUP_ROLES}}
-
- {{/if}}
-
-
@@ -201,25 +171,10 @@
+
+
+
+
New Role was successfully created.
+
+ Do you need to Add / Remove users to the chosen roles?
+
+
@@ -256,7 +247,8 @@
Yes
-
+
Cancel
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js
index 0c04f9bb2d..f432193231 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js
@@ -23,6 +23,10 @@ function onRequest(context) {
var groupPermissions = require("/app/pages/cdmf.page.groups/public/group-permissions.json");
var currentUser = session.get(constants.USER_SESSION_KEY);
var page = {};
+ var rolesResult = userModule.getRoles();
+ if (rolesResult.status == "success") {
+ page.userRoles = rolesResult.content;
+ }
if (currentUser) {
page.permissions = userModule.getUIPermissions();
page.permissions.list = stringify(page.permissions);
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js
index 1770cd26c4..1548ff4c71 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js
@@ -110,12 +110,12 @@ function loadGroups() {
var objects = [];
$(data.deviceGroups).each(function (index) {
objects.push({
- groupId: data.deviceGroups[index].id,
- name: data.deviceGroups[index].name,
- description: data.deviceGroups[index].description,
- owner: data.deviceGroups[index].owner,
- dateOfCreation: data.deviceGroups[index].dateOfCreation
- })
+ groupId: data.deviceGroups[index].id,
+ name: data.deviceGroups[index].name,
+ description: data.deviceGroups[index].description,
+ owner: data.deviceGroups[index].owner,
+ dateOfCreation: data.deviceGroups[index].dateOfCreation
+ })
});
var json = {
"recordsTotal": data.count,
@@ -154,34 +154,50 @@ function loadGroups() {
class: 'text-right content-fill text-left-on-grid-view no-wrap',
render: function (id, type, row, meta) {
var html;
- if ($.hasPermission("VIEW_GROUP_DEVICES")){
- html = '