merge-requests/1/head
thusithakalugamage 8 years ago
commit dc7bc22aa0

@ -37,6 +37,7 @@
</span> </span>
View View
</a> </a>
{{#if permissions.ENROLL_DEVICE)}}
<a href="javascript:toggleEnrollment()"> <a href="javascript:toggleEnrollment()">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
@ -44,6 +45,7 @@
</span> </span>
Add Add
</a> </a>
{{/if}}
</span> </span>
</div> </div>
</div> </div>

@ -29,6 +29,9 @@ function onRequest(context) {
permissions.ADD_POLICY = userModule.isAuthorized("/permission/admin/device-mgt/policies/manage"); permissions.ADD_POLICY = userModule.isAuthorized("/permission/admin/device-mgt/policies/manage");
permissions.ADD_ROLE = userModule.isAuthorized("/permission/admin/device-mgt/roles/manage"); permissions.ADD_ROLE = userModule.isAuthorized("/permission/admin/device-mgt/roles/manage");
permissions.ADD_USER = userModule.isAuthorized("/permission/admin/device-mgt/users/manage"); permissions.ADD_USER = userModule.isAuthorized("/permission/admin/device-mgt/users/manage");
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/enroll/ios") | userModule.isAuthorized("/permission/admin/devices/enroll/android") | userModule.isAuthorized("/permission/admin/device-mgt/devices/enroll/windows") ){
permissions.ENROLL_DEVICE = true;
}
viewModel.permissions = permissions; viewModel.permissions = permissions;
//TODO: Move enrollment URL into app-conf.json //TODO: Move enrollment URL into app-conf.json
viewModel.enrollmentURL = mdmProps.generalConfig.host + mdmProps.enrollmentDir; viewModel.enrollmentURL = mdmProps.generalConfig.host + mdmProps.enrollmentDir;

@ -110,7 +110,7 @@ function loadOperationBar(deviceType) {
var successCallback = function (data) { var successCallback = function (data) {
var permittedOperations = []; var permittedOperations = [];
var i; var i;
var permissionList = JSON.parse($("#operations-mod").data("permissions")); var permissionList = $("#operations-mod").data("permissions");
var totalFeatures = JSON.parse(data); var totalFeatures = JSON.parse(data);
for (i = 0; i < permissionList[deviceType].length; i++) { for (i = 0; i < permissionList[deviceType].length; i++) {
var j; var j;

Loading…
Cancel
Save