nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.22k stars 277 forks source link

Sharees not loaded / Disable sharing if `files_sharing` app is disabled #2014

Open waltherjj opened 4 years ago

waltherjj commented 4 years ago

Describe the bug The "share board with a user.." input field does not find users or groups to share with.

The request to the /sharees endpoint does not respond with available sharees but fails with the error below. Other apps in the instance (e.g. calendar, tasks) work as expected - i noted though, that their requests to the sharees endpoint fail with the same error, but they also request /remote.php/dav which seems to get the sharee results as well, while the decks app does not do this. I'm unsure if this is a bug or i am missing something here. Thanks a lot for your time!!

To Reproduce Steps to reproduce the behavior:

  1. Create new board
  2. Open board details
  3. Type in the "share with a user..." input field

Expected behavior Users and groups available for sharing should be displayed in a list.

Actual behavior List is empty.

Client details:

Server details **Operating system**: Ubuntu **Web server:** nginx **Database:** Postgres **PHP version:** 7.4.6 **Nextcloud version:** 19.0.0 **Where did you install Nextcloud from:** Docker image **Signing status:** ``` No errors have been found. ``` **List of activated apps:** ``` Enabled: - bruteforcesettings: 1.6.0 - calendar: 2.0.3 - cloud_federation_api: 1.2.0 - comments: 1.9.0 - contacts: 3.3.0 - contactsinteraction: 1.0.0 - dav: 1.15.0 - deck: 1.0.2 - external: 3.6.0 - federatedfilesharing: 1.9.0 - files: 1.14.0 - files_pdfviewer: 1.8.0 - files_rightclick: 0.16.0 - files_trashbin: 1.9.0 - files_videoplayer: 1.8.0 - groupfolders: 6.0.6 - logreader: 2.4.0 - lookup_server_connector: 1.7.0 - notes: 3.5.0 - oauth2: 1.7.0 - password_policy: 1.9.1 - passwords: 2020.6.0 - polls: 1.4.3 - provisioning_api: 1.9.0 - serverinfo: 1.9.0 - settings: 1.1.0 - systemtags: 1.9.0 - tasks: 0.13.1 - theming: 1.10.0 - theming_customcss: 1.6.0 - twofactor_backupcodes: 1.8.0 - viewer: 1.3.0 - workflowengine: 2.1.0 Disabled: - accessibility - activity - admin_audit - encryption - federation - files_external - files_sharing - files_versions - firstrunwizard - nextcloud_announcements - notifications - photos - privacy - rainloop - recommendations - sharebymail - support - survey_client - text - updatenotification - user_ldap ``` **Nextcloud configuration:** ``` { "system": { "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": { "0": "***REMOVED SENSITIVE VALUE***", "2": "***REMOVED SENSITIVE VALUE***e" }, "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "19.0.0.12", "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "overwriteprotocoll": "https", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_smtpauthtype": "LOGIN", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_smtpsecure": "ssl", "maintenance": false, "loglevel": 2 } } ```
Logs #### Console Log ``` `TypeError: t.exact is undefined` in main.js:189 ``` #### Network Log ``` Request URL:https://***REMOVED***/ocs/v1.php/apps/files_sharing/api/v1/sharees?search=&format=json&perPage=20&itemType=0%2C1%2C7 Request Method:GET Remote Address: ***REMOVED*** Status Code: 200 Version:HTTP/2 Referrer Policy:no-referrer RESPONSE: ocs | Object { meta: {…}, data: [] } -- | -- meta | Object { status: "failure", statuscode: 998, message: "Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.\n" } status | "failure" statuscode | 998 message | "Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.\n" data | [] ```
juliusknorr commented 4 years ago
meta | Object { status: "failure", statuscode: 998, message: "Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.\n" }

Anything in your Nextcloud log regarding the failed request?

waltherjj commented 4 years ago

no, there's nothing related to the request in the nextcloud log, even with log level debug.. :(

juliusknorr commented 4 years ago

Hm, that's odd, since the request url is actually correcly formatted and works here just fine on my 19 instance

juliusknorr commented 4 years ago

Ah, i see you have the files_sharing app disabled. In that case we of course cannot share as we use the sharing api for obtaining users. We should of course just not allow sharing then.

stefan-niedermann commented 4 years ago

Might be interesting for the Android app, too? Can one detect whether or not files_sharing is en/disabled via the capabilities endpoint or so?

waltherjj commented 4 years ago

Ah, i see you have the files_sharing app disabled. In that case we of course cannot share as we use the sharing api for obtaining users. We should of course just not allow sharing then.

aah, wow, ok i see. this was the problem - thanks a lot for the info! i didn't realize that this app also has implications for other shares than what i perceive as actual files - probably because the other apps like calendar still worked trough the dav sharing thing. thanks again for your time, also for this app!

juliusknorr commented 4 years ago

@stefan-niedermann Yes:

image