Page MenuHomeSealhub

create_strategies_with_complex_pipeline.js
No OneTemporary

create_strategies_with_complex_pipeline.js

const Query = require("../../lib/datastore/query.js");
module.exports = {
allow_deny: function(App) {
const access_strategies = [
"complex-deny-pipeline",
"complex-allow-pipeline",
];
for (const strategy of access_strategies) {
App.createChip(Sealious.AccessStrategyType, {
name: strategy,
getRestrictingQuery: async function() {
const query = new Query();
const id = query.lookup({
from: "numbers",
localField: "body.number",
foreignField: "sealious_id",
});
return query.match({
[`${id}._id`]: {
$exists: strategy === "complex-allow-pipeline",
},
});
},
checker_function: function() {
return Promise.resolve();
},
item_sensitive: true,
});
}
},
};

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 23, 19:19 (19 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
600933
Default Alt Text
create_strategies_with_complex_pipeline.js (765 B)

Event Timeline