some smb servers are very insistent in reporting that the root of the share is readonly, even if it isn't.
This works around the problem by adding a hidden option to overwrite the permissions of the root of the share.
This can be enabled using
```bash
occ files_external:config <mount id> root_force_writable true
```
where you can find your mount id using
```bash
occ files_external:list
```
Signed-off-by: Robin Appelman <robin@icewind.nl>
The remote URL of a share is always stored in the database with a
trailing slash. However, when a cloud ID is generated trailing slashes
are removed.
The ID of a remote storage is generated from the cloud ID, but the
"cleanup-remote-storage" command directly used the remote URL stored in
the database. Due to this, even if the remote storage was valid, its ID
did not match the ID of the remote share generated by the command and
ended being removed.
Now the command generates the ID of remote shares using the cloud ID
instead, just like done by the remote storage, so there is no longer a
mismatch.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
even thought we currently have no proper way of limiting the search itself, we can at least limit the construction of the result objects.
this saves about 40% of the time spend in the search request in my local testing
Signed-off-by: Robin Appelman <robin@icewind.nl>
Because the exceptions don't always contain a useful message for the UI,
but also because in some cases we need to find out what went wrong.
In some setups, a ShareNotFoundException might happen during creation
when we try to re-read the just written share. Usually related to Galera
Cluster where node syncing wait is not enabled.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Instead of always clearing the password in the share model, now only do
it when it was actually saved.
Fixes an issue where saving another field would clear the password too
early and prevent it to be saved when the dropdown closed.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
Remote shares currently do not support expiration date.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
The owner field is nowadays always empty when adding a federated share
using "Add to your Nextcloud", so don't check for it.
Fixes an issue where "Add to your Nextcloud" doesn't add anything.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>