Move security evaluations for File/Echoareas back to model

This commit is contained in:
2024-04-14 21:16:33 +10:00
parent 9c9fd84e0a
commit a2ff2df9f3
7 changed files with 42 additions and 8 deletions

View File

@@ -343,7 +343,7 @@ class MessageProcess implements ShouldQueue
}
// Can the system send messages to this area?
if (! $ea->sec_write || ($this->pktsrc->security < $ea->sec_write)) {
if (! $ea->can_write($this->pktsrc->security)) {
Log::alert(sprintf('%s:! FTN [%s] is not allowed to post [%s] to [%s].',self::LOGKEY,$this->pktsrc->ftn,$this->msg->msgid,$ea->name));
if (! $this->msg->rescanned->count())
Notification::route('netmail',$this->pktsrc)->notify(new EchoareaNoWrite($this->msg));