owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.4k stars 182 forks source link

remote shares don't work with demo users (uuids of the demo users are hardcoded) #9919

Open kulmann opened 2 months ago

kulmann commented 2 months ago

Describe the bug

When playing around with OCM I noticed (again) that uuids of the demo users are hardcoded, which makes them unusable for OCM tests. See details below:

Steps to reproduce

  1. As admin on instance A create an OCM invitation
  2. As einstein on instance B use the OCM invitation to accept the federated connection
  3. Create a folder test and open the Sharing panel in the sidebar
  4. Select External as user type and search for Einstein
  5. external Einstein is shown ✅
  6. Select external Einstein and create the share

Expected behavior

External einstein is shown as share receiver

Actual behavior

Internal einstein is shown as share receiver since both einsteins have the same uuid and then oCIS seems to prefer the internal user.

Thoughts

This is not really a software bug, as we expect the uuids to be unique! But maybe it is possible to randomize the uuids of the demo users? Is there a valid reason to hardcode them? Or did we just never have the need to make them unique? For OCM demo purposes it would be important.

rhafer commented 2 months ago

Is there a valid reason to hardcode them?

I think the only remaining reason is the hardcoded default role-assignments in the settings service: https://github.com/owncloud/ocis/blob/master/services/settings/pkg/store/defaults/defaults.go#L353

rhafer commented 2 months ago

Related ticket: https://github.com/owncloud/ocis/issues/9927 (and probably the better way to address this)