Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F996263
create_strategies_with_complex_pipeline.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
763 B
Referenced Files
None
Subscribers
None
create_strategies_with_complex_pipeline.js
View Options
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
:
"body.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
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 14:02 (16 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557141
Default Alt Text
create_strategies_with_complex_pipeline.js (763 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment