Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010240
logged-in.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
579 B
Referenced Files
None
Subscribers
None
logged-in.ts
View Options
import
Policy
from
"../../chip-types/policy"
;
import
{
Context
}
from
"../../main"
;
import
{
AllowAll
}
from
"../../datastore/allow-all"
;
import
DenyAll
from
"../../datastore/deny-all"
;
export
default
class
LoggedIn
extends
Policy
{
static
type_name
=
"logged-in"
;
async
_getRestrictingQuery
(
context
:
Context
)
{
if
(
context
.
user_id
)
{
return
new
AllowAll
();
}
return
new
DenyAll
();
}
async
checkerFunction
(
context
:
Context
)
{
if
(
context
.
user_id
)
{
return
Policy
.
allow
(
"you are logged in"
);
}
else
{
return
Policy
.
deny
(
"you are not logged in"
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:38 (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
627698
Default Alt Text
logged-in.ts (579 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment