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

@@ -360,7 +360,7 @@ class Tic extends FTNBase
// Validate sender is permitted to write
// @todo Send a notification
if (! $this->file->filearea->sec_write || ($this->file->fftn->security < $this->file->filearea->sec_write))
if (! $this->file->filearea->can_write($this->file->fftn->security))
throw new NoWriteSecurityException(sprintf('Node [%s] doesnt have enough security to write to [%s] (%d)',$this->file->fftn->ftn,$this->file->filearea->name,$this->file->fftn->security));
// If the file create time is blank, we'll take the files