Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F995841
logged-in.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
625 B
Referenced Files
None
Subscribers
None
logged-in.ts
View Options
import
Policy
from
"../../chip-types/policy"
;
import
type
{
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
(
context
.
app
.
i18n
(
"policy_logged_in_allow"
));
}
else
{
return
Policy
.
deny
(
context
.
app
.
i18n
(
"policy_logged_in_deny"
));
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Mon, Dec 23, 21:49 (23 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
555920
Default Alt Text
logged-in.ts (625 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment