ssb: Only admins are offered the option to enable peer exchange.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 32m49s

This commit is contained in:
2025-06-14 20:27:19 -04:00
parent cadc27b7b5
commit e54312d3b8
3 changed files with 15 additions and 6 deletions

View File

@ -112,6 +112,9 @@ tfrpc.register(async function globalSettingsGet(key) {
tfrpc.register(async function globalSettingsSet(key, value) {
return core.globalSettingsSet(key, value);
});
tfrpc.register(function isAdministrator() {
return core.user?.credentials?.permissions?.administration;
});
core.register('onBroadcastsChanged', async function () {
await tfrpc.rpc.set('broadcasts', await ssb.getBroadcasts());