Offene PayPal-Zahlungen bleiben nach dem Abschalten erreichbar
Wird PayPal in den Mandant-Einstellungen abgeschaltet, waehrend noch Zahlungen unzugeordnet in der Warteschlange liegen, kaeme ohne diese Ausnahme niemand mehr an sie heran - weder ueber das Menue noch ueber die URL. paypal_inbox_accessible() haelt Menuepunkt und Seite deshalb offen, solange paypal_count_unmatched() etwas findet; die Seite weist per Hinweis darauf hin, dass sie nach dem Abarbeiten verschwindet. Eine Sperre durch den Betreiber sticht die Ausnahme. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -45,6 +45,15 @@ $saasNavFeature = static function (string $key) use ($saasNavTenantId): bool {
|
||||
return app_feature_available(app_db_pdo(), $saasNavTenantId, $key);
|
||||
};
|
||||
|
||||
// Sonderfall PayPal: abgeschaltet heisst normalerweise unsichtbar - solange
|
||||
// aber noch Zahlungen unzugeordnet in der Warteschlange liegen, bleibt der
|
||||
// Menuepunkt stehen, sonst kaeme niemand mehr an sie heran.
|
||||
$saasNavPaypalInbox = true;
|
||||
if ($saasNavTenantId > 0) {
|
||||
require_once __DIR__ . '/app/paypal-inbox.php';
|
||||
$saasNavPaypalInbox = paypal_inbox_accessible(app_db_pdo(), $saasNavTenantId);
|
||||
}
|
||||
|
||||
// Das Back-Office war bisher nur ueber die direkte URL erreichbar. Es ist die
|
||||
// Zentralstelle des Betreibers und gehoert deshalb ins Menue - aber nur fuer
|
||||
// Platform-Admins, nicht fuer Mandanten-Rollen.
|
||||
@@ -74,7 +83,7 @@ if ($saasNavUser !== null) {
|
||||
<span class="menu-group-label">Verwaltung</span>
|
||||
<ul class="menu-group-items">
|
||||
<li><a href="einzahlung.php">Einzahlung eintragen</a></li>
|
||||
<?php if ($saasNavFeature('paypal_inbox')): ?>
|
||||
<?php if ($saasNavPaypalInbox): ?>
|
||||
<li><a href="paypal-zuordnung.php">PayPal-Zahlungen</a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="stricheintragen.php">Striche eintragen</a></li>
|
||||
|
||||
Reference in New Issue
Block a user