nextcloud / tasks

:white_check_mark: Tasks app for Nextcloud
https://apps.nextcloud.com/apps/tasks
GNU Affero General Public License v3.0
575 stars 100 forks source link

Sharing fails when autocompletion is disabled #1341

Open jirireischig opened 4 years ago

jirireischig commented 4 years ago

Steps to reproduce

  1. Create new task
  2. Click on "shared button"
  3. Type user name

Expected behaviour

Show user with user name which I'm looking for.

Actual behaviour

No user shown.

Server configuration

Operating system: CentOS 7

Web server: Apache

Database: Mariadb

PHP version: 7.3.24

Nextcloud version: 20.0.1

Tasks version: 0.13.5

Updated from an older Nextcloud or fresh install: Updated from an older

Signing status:

No problem

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_language": "cs",
        "default_locale": "cs_CZ",
        "loglevel": 3,
        "ldapIgnoreNamingRules": false,
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "theme": "",
        "trusted_domains": [
            "cloud."
        ],
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "lost_password_link": "https:\/\/xxx\/",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "auto",
        "tempdirectory": "\/www\/tmp\/cloud\/",
        "ldapUserCleanupInterval": 3360,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "overwrite.cli.url": "https:\/\/cloud",
        "overwritehost": "cloud",
        "mail_smtpauthtype": "LOGIN",
        "simpleSignUpLink.shown": false,
        "app_install_overwrite": [
            "calendar",
            "contacts",
            "gallery",
            "spreed"
        ],
        "app.mail.accounts.default": {
            "email": "%EMAIL%",
            "imapHost": "imap",
            "imapPort": 993,
            "imapUser": "%USERID%",
            "imapSslMode": "ssl",
            "smtpHost": "smtp",
            "smtpPort": 587,
            "smtpUser": "%USERID%",
            "smtpSslMode": "STARTTLS"
        }
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP

LDAP configuration (delete this part if not used)

+-------------------------------+--------------------------------------------+
| Configuration                 |                                            |
+-------------------------------+--------------------------------------------+
| hasMemberOfFilterSupport      |                                            |
| homeFolderNamingRule          |                                            |
| lastJpegPhotoLookup           | 0                                          |
| ldapAgentName                 |                                            |
| ldapAgentPassword             | ***                                        |
| ldapAttributesForGroupSearch  |                                            |
| ldapAttributesForUserSearch   |                                            |
| ldapBackupHost                |                                            |
| ldapBackupPort                | 389                                        |
| ldapBase                      | dc=cloud                               |
| ldapBaseGroups                | dc=cloud                               |
| ldapBaseUsers                 | dc=cloud                               |
| ldapCacheTTL                  | 600                                        |
| ldapConfigurationActive       | 1                                          |
| ldapDefaultPPolicyDN          |                                            |
| ldapDynamicGroupMemberURL     |                                            |
| ldapEmailAttribute            | mail                                       |
| ldapExperiencedAdmin          | 0                                          |
| ldapExpertUUIDGroupAttr       | cn                                         |
| ldapExpertUUIDUserAttr        | uid                                        |
| ldapExpertUsernameAttr        |                                            |
| ldapExtStorageHomeAttribute   |                                            |
| ldapGidNumber                 | gidNumber                                  |
| ldapGroupDisplayName          | cn                                         |
| ldapGroupFilter               | (&(objectclass=posixGroup)(cn=xxx))     |
| ldapGroupFilterGroups         | cloudusers                                   |
| ldapGroupFilterMode           | 1                                          |
| ldapGroupFilterObjectclass    | posixGroup                                 |
| ldapGroupMemberAssocAttr      | memberUid                                  |
| ldapHost                      | ldaps://xxxx                        |
| ldapIgnoreNamingRules         |                                            |
| ldapLoginFilter               | (&(|(objectclass=posixAccount))(uid=%uid)) |
| ldapLoginFilterAttributes     |                                            |
| ldapLoginFilterEmail          | 0                                          |
| ldapLoginFilterMode           | 1                                          |
| ldapLoginFilterUsername       | 1                                          |
| ldapMatchingRuleInChainState  | unknown                                    |
| ldapNestedGroups              | 0                                          |
| ldapOverrideMainServer        | 0                                          |
| ldapPagingSize                | 100                                        |
| ldapPort                      | 636                                        |
| ldapQuotaAttribute            | CloudQuota                              |
| ldapQuotaDefault              | 50 GB                                      |
| ldapTLS                       |                                            |
| ldapUserAvatarRule            | default                                    |
| ldapUserDisplayName           | gecos                                      |
| ldapUserDisplayName2          |                                            |
| ldapUserFilter                | (|(objectclass=inetOrgPerson))             |
| ldapUserFilterGroups          |                                            |
| ldapUserFilterMode            | 0                                          |
| ldapUserFilterObjectclass     | inetOrgPerson                              |
| ldapUuidGroupAttribute        | auto                                       |
| ldapUuidUserAttribute         | auto                                       |
| turnOffCertCheck              | 0                                          |
| turnOnPasswordChange          | 0                                          |
| useMemberOfToDetectMembership | 1                                          |
+-------------------------------+--------------------------------------------+

Client configuration

Browser: Vivaldi, Firefox, Chrome

Operating system: Linux

CalDAV-clients:

Logs

Web server error log

cloud. xxx - - [08/Nov/2020:12:46:57 +0100] "GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=xxx&perPage=200&itemType=principals HTTP/2.0" 200 221 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.112 Safari/537.36"

Nextcloud log (data/nextcloud.log)

empty

Browser log

link address:
https://cloud./ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=xxx&perPage=200&itemType=principals

response:
{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK","totalitems":"","itemsperpage":""},"data":{"exact":{"users":[{"label":"xxx","value":{"shareType":0,"shareWith":"xxx"},"status":[]}],"groups":[],"remotes":[],"remote_groups":[],"emails":[],"circles":[],"rooms":[],"lookup":[]},"users":[],"groups":[],"remotes":[],"remote_groups":[],"emails":[],"lookup":[],"circles":[],"rooms":[],"lookupEnabled":true}}}
raimund-schluessler commented 4 years ago

What is the "shared button" and why do you need to create a new task? You cannot share single tasks, only lists / calendars. And this works fine here.

In case you mean sharing a list, does this work for you in the Calendar app?

jirireischig commented 4 years ago

I'm sorry, I don't know right name of "shared button" . It is icon/button used for sharing something. It have icon-share. Yes, I mean lists of tasks not only singe task.

I tested it in Calendar app without success. The problem look like same as in Task app. Response from API look like same, too.

raimund-schluessler commented 4 years ago

Since it doesn't work in the Calendar app either, I think it is a configuration issue of your instance and nothing specific to the Tasks app.

What does the response say?

jirireischig commented 4 years ago

I'm sorry, I don't know where the exact error is. Sharing files working well on the same Nextcloud instance. You can find full server response from Nextcloud in my issue report. After search done, GIU show "No results". When I search the same user name for file share I got good answer but not i Task.

raimund-schluessler commented 4 years ago

Your server does not return the sharees. That is out of scope of the Tasks app, since this is handled by the server only.

raimund-schluessler commented 4 years ago

Could you check in the Server settings if sharing is allowed, please?

jirireischig commented 4 years ago

You are right, it's depend on one of configuration option in Sharing: "Allow username autocompletion in share dialog (if this is disabled the full username or email address needs to be entered)" When it's enabled, search is working well, but when it's disabled search is not working even searching username is full.

raimund-schluessler commented 4 years ago

Good to hear it's working for you now.

If username autocompletion does not work as you would expect, please create an issue in the server repository for it.

jirireischig commented 4 years ago

I'm sorry, but it's NOT working only in Taks nad Calenda app. It working good in server - file, directory sharing.

raimund-schluessler commented 4 years ago

When it's enabled, search is working well, but when it's disabled search is not working even searching username is full.

Didn't you say it works when this setting is enabled?

jirireischig commented 4 years ago

Yes, but I also say that file's sharing work well with this enabled, but in Tasks not. I'm sorry, I can't find if the error is in Tasks or in any other part of Nextcloud.

jirireischig commented 4 years ago

I'm sorry, I don't know where I can report this bug. I create new issue on server #23987 nad it was cc'ed to Tasks app - raimund-schluessler. Please, can you help me?

raimund-schluessler commented 4 years ago

It still is not very clear to me what your actual issue is. In https://github.com/nextcloud/server/issues/23987 you wrote that you have to disable "Allow username autocompletion in share dialog (if this is disabled the full username or email address needs to be entered)" to trigger your problem, right?

So this means, sharing with a user works in Tasks when autocompletion is allowed, correct?

And sharing fails when autocompletion is disabled, even if you type the full name?

jirireischig commented 4 years ago

I'm sorry, my english is bad. Sharing with a user works in Tasks when autocompletion is allowed. Sharing fails when autocompletion is disabled, even if you type the full name

It's mean, "no users" when I type full username if autocompletion is disabled.

raimund-schluessler commented 4 years ago

Sharing fails when autocompletion is disabled, even if you type the full name

Alright, thanks for the clarification. I renamed the issue to make this clear. I will have a look why this fails.