charitha 8 years ago
parent 58a9ea80c7
commit a625ccecf0

@ -120,14 +120,14 @@
<h4> <h4>
Select user roles to manage group sharing Select user roles to manage group sharing
<br><br> <br><br>
<div style="max-height: 200px; overflow: scroll" id="rolesListing"> <div style="max-height: 200px; overflow: auto" id="rolesListing">
</div> </div>
</h4> </h4>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div class="buttons"> <div class="buttons">
{{#if permissions.CREATE_GROUP_ROLES}} {{#if permissions.ADD_ROLE}}
<a href="{{@app.context}}/role/add" class="btn-operations"> <a href="{{@app.context}}/role/add" class="btn-operations">
New Role New Role
</a> </a>
@ -186,9 +186,9 @@
<div class="content"> <div class="content">
<div class="row"> <div class="row">
<div class="col-lg-5 col-md-6 col-centered"> <div class="col-lg-5 col-md-6 col-centered">
<h3>Group was successfully updated.</h3> <h3>Group successfully updated.</h3>
<br /> <br />
Do you need to Add / Remove users to the chosen roles? Do you want to manage users?
<div class="buttons"> <div class="buttons">
<a href="{{@app.context}}/users" id="share-group-add-users-yes-link" <a href="{{@app.context}}/users" id="share-group-add-users-yes-link"
class="btn-operations"> class="btn-operations">
@ -211,7 +211,7 @@
<div class="col-lg-5 col-md-6 col-centered"> <div class="col-lg-5 col-md-6 col-centered">
<h3>New Role was successfully created.</h3> <h3>New Role was successfully created.</h3>
<br /> <br />
Do you need to Add / Remove users to the chosen roles? Do you need to Add / Remove users from the chosen roles?
<div class="buttons"> <div class="buttons">
<a href="{{@app.context}}/users" id="share-group-add-users-yes-link" <a href="{{@app.context}}/users" id="share-group-add-users-yes-link"
class="btn-operations"> class="btn-operations">

@ -20,13 +20,11 @@ function onRequest(context) {
var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"]; var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"];
var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var groupPermissions = require("/app/pages/cdmf.page.groups/public/group-permissions.json");
var currentUser = session.get(constants.USER_SESSION_KEY); var currentUser = session.get(constants.USER_SESSION_KEY);
var page = {}; var page = {};
if (currentUser) { if (currentUser) {
page.permissions = userModule.getUIPermissions(); page.permissions = userModule.getUIPermissions();
page.permissions.list = stringify(page.permissions); page.permissions.list = stringify(page.permissions);
page.groupPermissions = groupPermissions.permissionList;
page.currentUser = currentUser; page.currentUser = currentUser;
var groupCount = groupModule.getGroupCount(); var groupCount = groupModule.getGroupCount();
if (groupCount > 0) { if (groupCount > 0) {

@ -1,15 +0,0 @@
{
"permissionList":["device-mgt/admin/groups/view",
"device-mgt/groups/add",
"device-mgt/groups/devices/add",
"device-mgt/groups/devices/remove",
"device-mgt/groups/devices/view",
"device-mgt/groups/remove",
"device-mgt/groups/roles/create",
"device-mgt/groups/roles/view",
"device-mgt/groups/share",
"device-mgt/groups/update",
"device-mgt/groups/users/view",
"device-mgt/groups/view"
]
}

@ -96,7 +96,7 @@ function loadGroups() {
serviceURL = "/api/device-mgt/v1.0/admin/groups"; serviceURL = "/api/device-mgt/v1.0/admin/groups";
} else if ($.hasPermission("LIST_GROUPS")) { } else if ($.hasPermission("LIST_GROUPS")) {
//Get authenticated users groups //Get authenticated users groups
serviceURL = "/api/device-mgt/v1.0/groups/user/" + currentUser; serviceURL = "/api/device-mgt/v1.0/groups";
} else { } else {
$("#loading-content").remove(); $("#loading-content").remove();
$('#device-table').addClass('hidden'); $('#device-table').addClass('hidden');

Loading…
Cancel
Save