nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.15k stars 4.03k forks source link

User entered credentials can only be set from the web UI #22547

Open juliushaertl opened 4 years ago

juliushaertl commented 4 years ago

The web UI checks if credentials still need to be provided in the mount point status coming form ocs/v2.php/apps/files_external/api/v1/mounts?format=json. If that is the case the credentials are asked in a modal and sent back to the server for storing them: https://github.com/nextcloud/server/blob/f63156976bd647607bd81f2b99786fd7d79ddf7c/apps/files_external/js/statusmanager.js#L389-L427

We ideally should have an OCS API that allows the clients to also implement such a credential dialog.

I would consider this more as an enhancement and document this limitation for now.

Steps to take

cc @rullzer

tobiasKaminsky commented 4 years ago

Clients are doing "only" propfind for folders, which might have this external storage as subfolder. Do you really check on each and every folder listing "if credentials still need to be provided in the mount point status"? I think this is too much and should be some sort of error code in propfind return, e.g."credentials missing" and then we can react upon this.

juliushaertl commented 4 years ago

I'll need to look into that a bit more in detail, but indeed it would make sense to somehow already provide the status "credentials missing" in the propfind response.