Page MenuHomeSealhub

super.ts
No OneTemporary

super.ts

import Policy from "../../chip-types/policy.js";
import type Context from "../../context.js";
import DenyAll from "../../datastore/deny-all.js";
import { AllowAll } from "../../datastore/allow-all.js";
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
text/x-java
Expires
Mon, Dec 23, 11:30 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
556896
Default Alt Text
super.ts (670 B)

Event Timeline