Files
tildefriends/apps/intro/app.js
Cory McWilliams 31d0a5c233
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 32m57s
intro: Don't meddle with settings as non-admin. #129
2025-06-16 12:20:09 -04:00

15 lines
369 B
JavaScript

import * as tfrpc from '/tfrpc.js';
async function main() {
await app.setDocument(utf8Decode(getFile('index.html')));
}
tfrpc.register(async function complete() {
if (core.user?.credentials?.permissions?.administration &&
(await core.globalSettingsGet('index')) == '/~core/intro/') {
return await core.globalSettingsSet('index', '/~core/ssb/');
}
});
main();