Page MenuHomeSealhub

create_strategies_with_complex_pipeline.js
No OneTemporary

create_strategies_with_complex_pipeline.js

const Promise = require("bluebird");
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 App.Query();
const id = query.lookup({
from: "numbers",
localField: "number",
foreignField: "sealious_id",
});
query.match({
[`${id}._id`]: {
$exists: strategy === "complex-allow-pipeline",
},
});
return query;
},
checker_function: function() {
return Promise.resolve();
},
item_sensitive: true,
});
}
},
};

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 20, 14:46 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
919064
Default Alt Text
create_strategies_with_complex_pipeline.js (758 B)

Event Timeline