Merge pull request #13291 from Quix0r/features/config-blocklist-published

Configuration key added to publish/hide blocklist
This commit is contained in:
Hypolite Petovan 2023-08-12 11:31:42 +02:00 committed by GitHub
commit 9c23a4511d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -94,8 +94,7 @@ class Friendica extends BaseModule
$blockList = $this->config->get('system', 'blocklist') ?? []; $blockList = $this->config->get('system', 'blocklist') ?? [];
$register_policy_int = $this->config->get('config', 'register_policy'); if (!empty($blockList) && ($this->config->get('blocklist', 'public') || $this->session->isAuthenticated())) {
if (!empty($blockList) && ($register_policy_int !== Register::CLOSED || $this->session->isAuthenticated())) {
$blocked = [ $blocked = [
'title' => $this->t('On this server the following remote servers are blocked.'), 'title' => $this->t('On this server the following remote servers are blocked.'),
'header' => [ 'header' => [

View File

@ -786,4 +786,9 @@ return [
// Banner for Mastodon API // Banner for Mastodon API
'mastodon_banner' => '/images/friendica-banner.jpg', 'mastodon_banner' => '/images/friendica-banner.jpg',
], ],
'blocklist' => [
// public (Boolean)
// Wether the blocklist is publicly listed under /about (or in any later API)
'public' => true,
],
]; ];