Replace Filter class with expression structure

This is in order to be able to support UPPER() and LOWER() functions in
queries which are needed for case-insensitive search.
This commit is contained in:
Zaid Abdulla committed 2018-12-26 00:22:07 -08:00
1 parent 7194fcab44
commit c2d13e8364
25 files changed
+716 -578

No files matched your search

+5 -5
View File
@@ -1,5 +1,7 @@
"use strict";
const expression = require("./expression");
const validators = {
pass: require("./validators/pass"),
test: require("./validators/test")
@@ -18,15 +20,13 @@ class Authorizer {
return this.hasAccessCache[cacheKey];
let has = false;
for (const permissionSet of this.permissionSets) {
for (const perm of permissionSet) {
if (perm[resourceType]) {
for (let permissionSet of this.permissionSets) {
for (let perm of permissionSet)
if (perm[resourceType])
if (perm[resourceType].access >= access) {
has = true;
break;
}
}
}
}
this.hasAccessCache[cacheKey] = has;