Page MenuHomeSealhub

super.ts
No OneTemporary

super.ts

import Policy from "../../chip-types/policy";
import 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("this method was ran with a supercontext");
} else {
return Policy.allow("this method was not ran with a supercontext");
}
}
isItemSensitive = async () => false;
}

File Metadata

Mime Type
text/x-java
Expires
Sat, Oct 11, 06:23 (4 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
951998
Default Alt Text
super.ts (655 B)

Event Timeline