charithag 9 years ago
parent 501fefc2d2
commit 062a843ca2

@ -40,7 +40,7 @@
</a> </a>
</li> </li>
{{else}} {{else}}
{{#if permissions.addDevice}} {{#if permissions.enroll}}
<li> <li>
<a href="{{@app.context}}/device/enroll" class="cu-btn"> <a href="{{@app.context}}/device/enroll" class="cu-btn">
<span class="icon fw-stack"> <span class="icon fw-stack">

@ -26,10 +26,11 @@ function onRequest(context) {
page.groupName = groupName; page.groupName = groupName;
} }
page.title =title; page.title =title;
page.permissions = {};
var currentUser = session.get(constants.USER_SESSION_KEY); var currentUser = session.get(constants.USER_SESSION_KEY);
if (currentUser) { if (currentUser) {
if (userModule.isAuthorized("/permission/admin/device-mgt/admin/devices/add")) { if (userModule.isAuthorized("/permission/admin/device-mgt/admin/devices/add")) {
page.addDevice = true; page.permissions.enroll = true;
} }
} }
return page; return page;

Loading…
Cancel
Save