Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7860390
access_strategy.just_owner.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
433 B
Referenced Files
None
Subscribers
None
access_strategy.just_owner.js
View Options
var
Sealious
=
require
(
"sealious"
);
var
Promise
=
require
(
"bluebird"
);
var
JustOwner
=
new
Sealious
.
ChipTypes
.
AccessStrategy
({
name
:
"just_owner"
,
checker_function
:
function
(
context
,
item
){
if
(
context
.
get
(
"user_id"
)
===
item
.
created_context
.
user_id
)
{
return
Promise
.
resolve
();
}
else
{
return
Promise
.
reject
(
"Only the owner of this resource can perform this operation on this item."
);
}
},
item_sensitive
:
true
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 13, 18:00 (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
871383
Default Alt Text
access_strategy.just_owner.js (433 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment