Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links to contacts do not work properly in shared databases. #1481

Open
osm-frasch opened this issue Nov 29, 2024 · 13 comments
Open

Links to contacts do not work properly in shared databases. #1481

osm-frasch opened this issue Nov 29, 2024 · 13 comments
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working medium Medium priority

Comments

@osm-frasch
Copy link

osm-frasch commented Nov 29, 2024

Steps to reproduce

Links to contacts do not work properly in shared databases.

A column has been created which offers the possibility to link to contacts (shared adressbook).

The following problem arises:

  1. If I select a contact from the Contacts app when creating or changing an entry and then click on the link after saving, the contact is called up correctly.

  2. But if a person - with this database is shared and who also has the necessary rights (create/update) does the same as described under 1. this also works for this person. But only for this person!

Not for all other persons who also have same access and at least the rights (create/update). If everyone else clicks on the link, a browser tab opens with the contacts app. However, the selected contact is not displayed, but simply the Contacts app list.

Nextcloud Hub 8 29.0.9 Enterprise

Image

Expected behavior

Database-Links to an shared adressbook of the Contacts-App should point directly to the selected Contact. This should even work for all members of the shared Database.

Actual behavior

Database-Links to an shared adressbook of the Contacts-App point directly to the selected Contact working only for the Person who created the database Link. Other Members can see only the List of the relating adressbook.

Tables app version

0.8.1

Browser

Firefox (latest), Chrome (latest)

Client operating system

Linux / Win

Operating system

Linux 4.18.0-553.8.1.el8_10.x86_64 x86_64 / docker

Web server

None

PHP engine version

PHP 8.2

Database

MySQL

Additional info

I can also find entries in the system log. I suspect this has something to do with:

The following for example (There are quite a few that are the same): "Value could not be parsed for column Kontaktdaten (via Kontakte App) "

[tables] Fehler: Value {"title":"Max, Muster","value":"https://YY.XXXX.de/index.php/apps/contacts/direct/contact/bf1bcfb7-ae47-4f65-a3a2-7cfb3fea4298~contacts","providerId":"url"} cannot be parsed as the column 453 does not allow the provider: url
PUT /index.php/apps/tables/row/1487 von xxx.xx.xx.xx von KarlKnapp um 28.11.2024, 10:28:39

@osm-frasch osm-frasch added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Nov 29, 2024
@blizzz
Copy link
Member

blizzz commented Nov 29, 2024

@osm-frasch Thank you for reporting! To clarify when you say

with whom this database is shared

do I understand correctly, that you refer to a shared addressbook?

@blizzz blizzz added the needs info Not enough information provided label Nov 29, 2024
@osm-frasch
Copy link
Author

osm-frasch commented Nov 29, 2024

@blizzz Yes, the database is shared with a few internal user accounts

Everyone has access to this address book in the Contacts app anyway. It is our internal company address book.

This address book was created by me (a long time ago) and is shared with all employees. I have also given all employees full write access to the address book.

@osm-frasch
Copy link
Author

@blizzz
Have I been able to clear things up a bit or is more information needed?

@blizzz
Copy link
Member

blizzz commented Nov 29, 2024

@osm-frasch thanks, this is helpful.

Btw, as enterprise user, have you brought this up as support ticket?

@osm-frasch
Copy link
Author

@blizzz Yes i gave a short hint and a link to this bugreport in the support channel of our provider at the same time

@osm-frasch
Copy link
Author

@blizzz
I have also tried to prepare the bug graphically to show it a little better

Image

@blizzz
Copy link
Member

blizzz commented Dec 4, 2024

@osm-frasch thank you. I could reproduce the issue and have following findings that contribute to this situation:

1.) The title is hard coded in the cell value. It looks like:

{
  "title": "Karenina, Anna",
  "value": "https://cloud.example.org/index.php/apps/contacts/direct/contact/a99ae951-8228-4c15-8d4b-1718ecc82284~ghosts",
  "providerId": "url"
}

Possible solution: check whether contacts/dav is sending out events when an entry is changed and update the title accordingly. This will likely not scale very well, as we know which columns can be contacts, but otherwise we have nothing that is indexed and can be accessed quickly. Maybe this is OK as a background job. Another option could be to do some extra bookkeeping (new table or caching) and fetch the title from there.

2.) The stored URL redirects to an unknown place at share recipients

The contact URL is stored as https://cloud.example.org/index.php/apps/contacts/direct/contact/a99ae951-8228-4c15-8d4b-1718ecc82284~ghosts and when calling it, it redirects to …/apps/contacts/direct/contact/a99ae951-8228-4c15-8d4b-1718ecc82284~ghosts. The portion ~ghosts marks the addressbook, but for share recipients the name is ~ghosts_shared_by_USERID.

The problems works the other way around as well:

When a share recipient adds a contact, the owner will not be able to open the contact, for the addressbook is now including the shared_by part.

I think here we rather need an absolute URL provided by dav to use instead, or have dav be more fault tolerant and find the entry in a different available addressbook if the provided one fails.

@blizzz blizzz added 1. to develop Accepted and waiting to be taken care of medium Medium priority and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. needs info Not enough information provided labels Dec 4, 2024
@osm-frasch
Copy link
Author

@blizzz

Hmm, I think that this is probably more a matter for the Nextcloud devs or the developers of the table app. Too bad I thought it would be mature enough, it is offered as a linking feature and is also easy to use ;-) I might make use of the absolute URL.
I will point this out again in our hoster's support ticket. Thanks for the answer.

So a better event processing (e.g.) could ensure that the titles in linked tables are always up-to-date, if I have understood this correctly. Thanks for investigating the cause

@osm-frasch
Copy link
Author

osm-frasch commented Dec 5, 2024

@blizzz
(additional info)

Hello, here I am again.
I have created another column in the table for the same initial situation as described above.
You can now insert a URL there.

I copy the URL of the selected contact from the shared address book from the browser address bar
and paste this link into the relevant cell in the new column.

If I now click on this link in the table, I also simply end up in the main view of the address book. All other users of the table do the same. (Same situation as described above, only now with a hard link)

And now it gets funny. If one of the other table users creates this link, it works for everyone. Even for me.

About the rights.
I am NC-Admin and member of the main group ‘Staff’
I have created an address book with all the members of our company and
shared it completely with the ‘Staff’ group, including write authorisation.
I am also the owner of the table discussed here.

All members of the table are of course also members of the shared address book ("Staff" Group) and have the rights ‘Create data’ and ‘Update’ in the table.

This is the original (Browser URL) link I copied into the table with Strg-c and strg-v
xx.xxxxxx.de/index.php/apps/contacts/Alle%20Kontakte/af48b4ce-6e77-461b-b190-932f15431790~contacts

This is the link that is called up when I click on the URL after creating it.
xx.xxxxxx.de/index.php/apps/contacts/Alle%20Kontakte/xxxxx~z-server-generated--system

These are the links that are created from/for other users of the Tables app. These will then work for everyone else except me
xx.xxxxxx.de/index.php/apps/contacts Alle%20Kontakte/3335c587-3302-48e7-8c76-8f8cb659140c~contacts_shared_by_XXXXXXXXXXXX

_...but, however, this generally has to do with what has already been described above.

@blizz
Copy link

blizz commented Dec 5, 2024 via email

@blizzz
Copy link
Member

blizzz commented Dec 5, 2024

These are the links that are created from/for other users of the Tables app. These will then work for everyone else except me
xx.xxxxxx.de/index.php/apps/contacts Alle%20Kontakte/3335c587-3302-48e7-8c76-8f8cb659140c~contacts_shared_by_XXXXXXXXXXXX

This should work for everybody apart of the owner of the contacts addressbook. And independent whether the URL field generic or tight to contacts.

@osm-frasch
Copy link
Author

@blizzz
Yes, that's exactly what it does. But why not for me?
Yes, I am the owner of the address book and the table. (Is that the bug?)

@blizzz
Copy link
Member

blizzz commented Dec 10, 2024

The addressbook identifiert here is different for you and for the share recipients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working medium Medium priority
Projects
None yet
Development

No branches or pull requests

3 participants