]> git.mxchange.org Git - friendica.git/commitdiff
Fixed:
authorRoland Häder <roland@mxchange.org>
Mon, 17 Jul 2023 12:56:56 +0000 (14:56 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 17 Jul 2023 13:01:47 +0000 (15:01 +0200)
- allow administrator to choose whether the blocklist is published under
  `/about` or later any other API (e.g. common is
  `/api/v1/instance/domain_blocks`).

src/Module/Friendica.php
static/defaults.config.php

index c6e2768bd300032519a894cf4e68afa863f5f6f8..2dbe5d7a9d61fc89860eb533d66c20f07678bc28 100644 (file)
@@ -94,8 +94,7 @@ class Friendica extends BaseModule
 
                $blockList = $this->config->get('system', 'blocklist') ?? [];
 
-               $register_policy_int = $this->config->get('config', 'register_policy');
-               if (!empty($blockList) && ($register_policy_int !== Register::CLOSED || $this->session->isAuthenticated())) {
+               if (!empty($blockList) && ($this->config->get('blocklist', 'published') || $this->session->isAuthenticated())) {
                        $blocked = [
                                'title'    => $this->t('On this server the following remote servers are blocked.'),
                                'header'   => [
index e8f44613ce2d0034f0df335f5338d440ba7e8daa..e2ce631d0dbb095d261ed81c5361ed484167a942 100644 (file)
@@ -786,4 +786,9 @@ return [
                // Banner for Mastodon API
                'mastodon_banner' => '/images/friendica-banner.jpg',
        ],
+       'blocklist' => [
+               // published (Boolean)
+               // Wether the blocklist is published under /about (or any later API)
+               'published' => true,
+       ],
 ];