Skip to content

[stable34] Fix cancelling the customization of a share - #63658

Merged
danxuliu merged 10 commits into
stable34from
backport/63227/stable34
Aug 28, 2026
Merged

[stable34] Fix cancelling the customization of a share#63658
danxuliu merged 10 commits into
stable34from
backport/63227/stable34

Conversation

@backportbot

@backportbot backportbot Bot commented Aug 26, 2026

Copy link
Copy Markdown

Backport of PR #63227

The SharingDetailsTab provides buttons to cancel and save the share, so
the share should be saved only when doing it explicitly.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"onNoteChange" is not called from anywhere, so "newNote" is never set
and therefore "onNoteSubmit" does nothing.

"onMenuClose" is not called from anywhere either in "SharingEntry".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The SharingDetailsTab provides buttons to cancel and save the share, so
the share should be saved only when doing it explicitly.

Moreover, the documentation of "onPasswordSubmit" mentions that it was
saved when closing the menu because the password is the only property
that is not automatically synced, so this was clearly a legacy
behaviour.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The methods and properties were not used anywhere. There are very
similar ones in SharingDetailsTab, so it seems that they were a leftover
from when they were moved there.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
If video verification is enabled it is not possible to save a share
without a password. This could happen if the password is removed without
unchecking first the video verification. Therefore, if the password is
disabled now the video verification is also disabled when the share is
saved.

An alternative would be to disable the video verification in the share
object as soon as the password is disabled, even if it was not saved
yet. However the video verification was not disabled until the share is
saved to ensure that, for example, a misclick on the password does not
change the video verification state and forces the user to explicitly
enable it again.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The SharingDetailsTab provides buttons to cancel and save the share, so
the share should be saved only when doing it explicitly.

Note that although "saveShare()" only sends the password when it is
modified there is no need to explicitly send it for mail shares like it
was done in the removed code, as for mail shares the
"Video verification" checkbox is shown only when the password was
modified, so "password" is implicitly sent when "sendPasswordByTalk" is
sent.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This has been broken since it was refactored in
208ff80, although it seems that the
method was not used anywhere (not even when it was refactored).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The SharingDetailsTab receives a share object and uses it as the model
to be edited from the UI components. Therefore, when the edition is
cancelled, the share object should be returned to its original state.
Otherwise any UI using the share object would still show the modified
state.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"newPassword" is internally delegated by the share object to
"_share.newPassword" through getter and setter properties. Therefore
deleting "newPassword" has no effect, as there is no such attribute,
and it should be set to undefined instead.

Now that "newPassword" is correctly cleared "Set password" is no longer
checked if the share of a password is removed, the share is updated, and
the share is customized again (without reloading the page in the
meantime).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@backportbot
backportbot Bot requested review from a team as code owners August 26, 2026 09:30
@backportbot
backportbot Bot requested review from come-nc, danxuliu, kristian-zendato, leftybournes, salmart-dev, skjnldsv, sorbaugh and susnux and removed request for a team August 26, 2026 09:30
@backportbot backportbot Bot added this to the Nextcloud 34.0.4 milestone Aug 26, 2026
@danxuliu

Copy link
Copy Markdown
Member

/compile

@danxuliu danxuliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested and works 👍

@danxuliu
danxuliu enabled auto-merge August 28, 2026 10:38
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@danxuliu
danxuliu merged commit 4c51cfd into stable34 Aug 28, 2026
173 checks passed
@danxuliu
danxuliu deleted the backport/63227/stable34 branch August 28, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants