The share details page should show the target email or user/server to which
the user is creating the share.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
The new sharing flow since NC27 requires that users open the sharing details tab and
customize their share before creating it.
In https://github.com/nextcloud/server/pull/39472 the work of `addShare` was handed down to
`openSharingDetails` that opens the sharing details tab for the user to customize and manually
creat their share.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
The new sharing flow requires or implies that users should edit share before creating.
External sources should not created the share IF we would upon sharing details tab on first request.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
`this.shares.unshift` mutates the share object for every component that uses
the share mixin.
Using the immutable approach changes the array reference which makes the mixin
lose track of the share object.
It would have been better to bubble up the share object but here we are :)
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
[EA] New value type (\DateTime) is not matching the resolved parameter type and might introduce types-related false-positives.
Signed-off-by: Joas Schilling <coding@schilljs.com>
`expireDate` can be set once and used anywhere needed, the current implementation,
duplicates this behavior which leads to `parseDate` receiving an a date object it
parsed and returend earlier in the createShare method.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
- Verify that explicitly sending empty `expireDate` param to server overwrite default
and sets not expiry date, if non is enforced.
- Update tests to avoid converting empty string to date.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
These changes fixes the issue of having the refresh the UI after share creation, as the share is not
immediately removed from the UI list.
Important changes
- The basis of checking wether a password/expire date is no longer based on config values alone
because the config is not expected in a share creation circle. Hence we check the configs and check
if the share object (this.share) has the expected values set. This way, once the required properties
are set, code control does not enter the block meant to handle the setting of required properties
unneccessarily.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
- Send correct share attributes (`share.attributes`) to server upon creation.
- Delete parts of code that create or reference, `share.hasDownloadPermission`
(Not required by Share API)
Resolves : https://github.com/nextcloud/server/issues/44131
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
When creating a new share, if the user unchecks "Set expiry date"
no `expireDate` is sent to the server.
However, the server then assumes the default configured, hence better
to send an empty value.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>