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

fix: Properly handle share attributes if set to null #47638

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Aug 30, 2024

The database value of share attributes can be null, for example if creating a new share through the API. I stumbled over this when creating a new share with a deck card.

Now the frontend was unable to handle such a value from the backend and no advanced settings appeared at all, furthermore setting it was also not possible.

The default for canDownload is now always assumed true as this is the case if there is no share attribute set.

Checklist

@juliusknorr juliusknorr added bug 3. to review Waiting for reviews labels Aug 30, 2024
@juliusknorr juliusknorr added this to the Nextcloud 31 milestone Aug 30, 2024
@skjnldsv
Copy link
Member

The default for canDownload is now always assumed true as this is the case if there is no share attribute set.

But is it true by default on the backend?

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

aside from my comment, it makes sense

@juliusknorr
Copy link
Member Author

The default for canDownload is now always assumed true as this is the case if there is no share attribute set.

But is it true by default on the backend?

When creating a new share without having attributes set, we allow download on the backend, yes.

The frontend however always sets the download attributes explicitly to true

@juliusknorr
Copy link
Member Author

/compile rebase

@juliusknorr juliusknorr merged commit 7362ede into master Aug 30, 2024
116 checks passed
@juliusknorr juliusknorr deleted the fix/share-attributes-null branch August 30, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants