Fixed:
- 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`).
This commit is contained in:
parent
54033b5e5a
commit
bcd2b1c523
|
@ -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', 'published') || $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' => [
|
||||||
|
|
|
@ -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' => [
|
||||||
|
// published (Boolean)
|
||||||
|
// Wether the blocklist is published under /about (or any later API)
|
||||||
|
'published' => true,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user