Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh: add backend check for download permission for cloud attachements #9592

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hamza221
Copy link
Contributor

@hamza221 hamza221 commented Apr 22, 2024

For now it silently Fails on draft/outbox save/update

  • Find a way to reflect in the front end for versions prior to 3.6 if needed (not needed)

@hamza221 hamza221 self-assigned this Apr 22, 2024
@hamza221 hamza221 added 2. developing 3. to review enhancement skill:backend Issues and PRs that require backend development skills and removed 2. developing labels Apr 22, 2024
@hamza221 hamza221 marked this pull request as ready for review May 2, 2024 10:41
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
@hamza221 hamza221 force-pushed the enh/backend-check-for-download-permission branch from 3985509 to 0b875b4 Compare May 8, 2024 17:09
@hamza221 hamza221 requested review from st3iny and kesselb May 8, 2024 17:09
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backend side works. When sending the mail a warning is logged, the attachment is still shown in the frontend (composer) but not sent.

I wonder why the frontend let's me pick a file without download permissions. Shouldn't the file picker filter incoming shares without download permissions?

$attributes = $share->getAttributes();

if($attributes->getAttribute('permissions', 'download') === false) {
$this->logger->warning("Could not create attachment, no download permission for file: ${$attachment['fileName']}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->logger->warning("Could not create attachment, no download permission for file: ${$attachment['fileName']}");
$this->logger->warning("Could not create attachment, no download permission for file: " . $attachment['fileName']);

Array accesses inside string interpolations are not working.

@hamza221
Copy link
Contributor Author

hamza221 commented May 13, 2024

they're supposed to be filtered out, it's a regression, I'm investigating
update: 0958ec3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement skill:backend Issues and PRs that require backend development skills
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants