import Page from "@entity-access/server-pages/dist/Page.js"; import { Prepare } from "@entity-access/server-pages/dist/decorators/Prepare.js"; @Prepare.authorize export default class extends Page { async run() { if (this.sessionUser.userName) { return this.json({ userName: this.sessionUser.userName, roles: this.sessionUser.roles }); } return this.json({}); } }