Skip to content

Commit

Permalink
LIMS-1246: Use finer grained permissions for admin menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Williams committed May 30, 2024
1 parent 25a0946 commit 83fbd8e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions client/src/js/app/components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
</router-link>
</div>
<div
v-if="isStaff"
class="tw-flex"
>
<!-- Only show those links with correct permission -->
Expand Down Expand Up @@ -155,4 +154,4 @@ export default {
@apply tw-bg-center;
}
}
</style>
</style>
2 changes: 1 addition & 1 deletion client/src/js/modules/types/em/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ define([], function() {
},
admin: {
'dewars/overview': { title: 'Logistics', icon: 'fa-truck', permission: 'all_dewars' },
faults: { title: 'Fault Reports', icon: 'fa-tasks' },
faults: { title: 'Fault Reports', icon: 'fa-tasks', permission: 'fault_view' },
},
}
})
2 changes: 1 addition & 1 deletion client/src/js/modules/types/gen/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define([], function() {
},

admin: {
faults: { title: 'Fault Reports', icon: 'fa-tasks' },
faults: { title: 'Fault Reports', icon: 'fa-tasks', permission: 'fault_view' },

},
}
Expand Down
4 changes: 2 additions & 2 deletions client/src/js/modules/types/mx/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ define([], function() {
'stats/overview/beamlines': { title: 'Reporting', icon: 'fa-line-chart', permission: 'all_prop_stats' },
'admin/imaging': { title: 'Imaging', icon: 'fa-image', permission: 'imaging_dash' },
'dewars/overview': { title: 'Logistics', icon: 'fa-truck', permission: 'all_dewars' },
statistics: { title: 'Stats', icon: 'fa-pie-chart' },
faults: { title: 'Fault Reports', icon: 'fa-tasks' },
statistics: { title: 'Stats', icon: 'fa-pie-chart', permission: 'mx_admin' },
faults: { title: 'Fault Reports', icon: 'fa-tasks', permission: 'fault_view' },
},
}
})
2 changes: 1 addition & 1 deletion client/src/js/modules/types/pow/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define([], function() {
},

admin: {
faults: { title: 'Fault Reports', icon: 'fa-tasks' },
faults: { title: 'Fault Reports', icon: 'fa-tasks', permission: 'fault_view' },
},
}

Expand Down
2 changes: 1 addition & 1 deletion client/src/js/modules/types/saxs/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ define([], function() {
admin: {
'runs/overview': { title: 'Run Overview', icon: 'fa-bar-chart', permission: 'all_breakdown' },
'dewars/overview': { title: 'Logistics', icon: 'fa-truck', permission: 'all_dewars' },
faults: { title: 'Fault Reports', icon: 'fa-tasks' },
faults: { title: 'Fault Reports', icon: 'fa-tasks', permission: 'fault_view' },
},
}

Expand Down
2 changes: 1 addition & 1 deletion client/src/js/modules/types/sp/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ define([], function() {
},

admin: {
faults: { title: 'Fault Reports', icon: 'fa-tasks' },
faults: { title: 'Fault Reports', icon: 'fa-tasks', permission: 'fault_view' },
},
}

Expand Down

0 comments on commit 83fbd8e

Please sign in to comment.