Implement authentication and access control
This commit is contained in:
1 parent
e1bdcda191
commit
327cb78f1a
27 files changed
+600
-167
No files matched your search
@@ -24,9 +24,12 @@ function queryCharts(charts) {
|
||||
}
|
||||
|
||||
const init = function() {
|
||||
return new Promise(resolve => {
|
||||
resolve({ charts: queryCharts(CHARTS) });
|
||||
});
|
||||
if (!window.authorizer.hasAccess("devices", 1))
|
||||
return Promise.reject(
|
||||
new Error("You are not authorized to view this page")
|
||||
);
|
||||
|
||||
return Promise.resolve({ charts: queryCharts(CHARTS) });
|
||||
};
|
||||
|
||||
const component = {
|
||||
|
||||
Reference in new issue
Block a user