system: handle privileges for notifications

This commit is contained in:
Stephan de Wit 2025-01-17 11:25:02 +01:00
parent 6d75f5d0c7
commit 1b2abc89c1

View File

@ -33,7 +33,10 @@ class Status {
updateStatus() {
const fetch = new Promise((resolve, reject) => {
ajaxGet('/api/core/system/status', {path: window.location.pathname}, function (data) {
ajaxGet('/api/core/system/status', {path: window.location.pathname}, function (data, status) {
if (status !== "success") {
reject(status);
}
resolve(data);
});
});
@ -43,6 +46,12 @@ class Status {
data.subsystems = { };
}
this.notify(data);
}, (reject) => {
// Either inaccessible or something went wrong on the backend.
$('#system_status').css({
'cursor': 'default',
'pointer-events': 'none'
});
});
}