When addind attachments to events, we can get hold of the file entries via the FileRequest::forEvent($eventId)->get() method.
$eventFiles= FileRequest::forEvent($eventId)->get();
This returns the array with all files, but when i later on try to download the file via $ctFile->downloadToPath('mytempfile.txt) and the user has no rights to download file:
a) A file with that name is still created
b) Content is wrong (Access error message with HTML)
c) Api still returns OK for the download
Message in downloaded file:
Keine ausreichende Berechtigung. Das Recht 'churchservice:view' ist notwendig.
Attached is such an example of a download without enough rights
Flyer.pdf
When addind attachments to events, we can get hold of the file entries via the
FileRequest::forEvent($eventId)->get()method.$eventFiles= FileRequest::forEvent($eventId)->get();This returns the array with all files, but when i later on try to download the file via
$ctFile->downloadToPath('mytempfile.txt)and the user has no rights to download file:a) A file with that name is still created
b) Content is wrong (Access error message with HTML)
c) Api still returns OK for the download
Message in downloaded file:
Keine ausreichende Berechtigung. Das Recht 'churchservice:view' ist notwendig.
Attached is such an example of a download without enough rights
Flyer.pdf