intro: Don't meddle with settings as non-admin. #129
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 32m57s

This commit is contained in:
2025-06-16 12:20:09 -04:00
parent 140179e80a
commit 31d0a5c233
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "💡",
"previous": "&5mHBroqVkbIVIYi883j374WJTlbDb2RwrG/9zZUBA7Q=.sha256"
"previous": "&eN6DNPpQUNhGvxneLuLPgsOXR6qyFZ7u+MAz0b4fa7k=.sha256"
}

View File

@ -5,7 +5,8 @@ async function main() {
}
tfrpc.register(async function complete() {
if ((await core.globalSettingsGet('index')) == '/~core/intro/') {
if (core.user?.credentials?.permissions?.administration &&
(await core.globalSettingsGet('index')) == '/~core/intro/') {
return await core.globalSettingsSet('index', '/~core/ssb/');
}
});