Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F8922645
same-anon.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
735 B
Referenced Files
None
Subscribers
None
same-anon.js
View Options
"use strict"
;
const
Query
=
require
(
"../../../datastore/query.js"
);
module
.
exports
=
{
name
:
"same-anon"
,
getRestrictingQuery
:
async
function
(
context
,
params
)
{
if
(
context
.
anonymous_user_id
)
{
return
Query
.
fromSingleMatch
({
"created_context.anonymous_user_id"
:
context
.
anonymous_user_id
,
});
}
return
new
Query
.
AllowAll
();
},
checker_function
:
function
(
context
,
params
,
item
)
{
if
(
context
.
anonymous_user_id
===
null
)
{
return
Promise
.
reject
();
}
if
(
context
.
anonymous_user_id
===
item
.
created_context
.
anonymous_user_id
)
{
return
Promise
.
resolve
();
}
else
{
return
Promise
.
reject
(
"Only the user who created this resource can have access to it"
);
}
},
item_sensitive
:
true
,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 20, 14:47 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
925507
Default Alt Text
same-anon.js (735 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment