Implement authentication and access control

This commit is contained in:
Zaid Abdulla committed 2018-12-26 00:22:07 -08:00
1 parent e1bdcda191
commit 327cb78f1a
27 files changed
+600 -167

No files matched your search

+7 -4
View File
@@ -9,10 +9,13 @@ import * as store from "./store";
import * as notifications from "./notifications";
function init(args) {
return new Promise(resolve => {
let filter = new Filter(args.filter);
resolve({ filter: filter });
});
if (!window.authorizer.hasAccess("devices", 2))
return Promise.reject(
new Error("You are not authorized to view this page")
);
let filter = new Filter(args.filter);
return Promise.resolve({ filter: filter });
}
function renderTable(faultsResponse, total, selected, showMoreCallback) {