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

@@ -52,8 +52,8 @@ class Rescan extends Command
throw new \Exception(sprintf('FTN [%s] is not subscribed to [%s]',$ao->ftn,$eao->name));
// Check that an FTN can read the area
if (! $eao->sec_read || ($ao->security < $eao->sec_read))
throw new \Exception(sprintf('FTN [%s] doesnt have permission to received [%s]',$ao->ftn,$eao->name));
if (! $eao->can_read($ao->security))
throw new \Exception(sprintf('FTN [%s] doesnt have permission to receive [%s]',$ao->ftn,$eao->name));
foreach (Echomail::select('id')
->where('echoarea_id',$eao->id)