Page MenuHomeSealhub

super.ts
No OneTemporary

Authored By
Unknown
Size
658 B
Referenced Files
None
Subscribers
None

super.ts

import Policy from "../../chip-types/policy";
import type Context from "../../context";
import DenyAll from "../../datastore/deny-all";
import { AllowAll } from "../../datastore/allow-all";
export default class Super extends Policy {
static type_name = "super";
async _getRestrictingQuery(context: Context) {
if (context.is_super) {
return new AllowAll();
}
return new DenyAll();
}
async checkerFunction(context: Context) {
if (context.is_super) {
return Policy.allow(context.app.i18n("policy_super_allow"));
} else {
return Policy.deny(context.app.i18n("policy_super_deny"));
}
}
isItemSensitive = async (_: Context) => false;
}

File Metadata

Mime Type
application/javascript
Expires
Mon, Nov 9, 13:44 (5 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1182220
Default Alt Text
super.ts (658 B)

Event Timeline