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

Grouping of shares #6518

Closed
dschmidt opened this issue Mar 3, 2022 · 1 comment · Fixed by #8337
Closed

Grouping of shares #6518

dschmidt opened this issue Mar 3, 2022 · 1 comment · Fixed by #8337
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working

Comments

@dschmidt
Copy link
Member

dschmidt commented Mar 3, 2022

I have some questions to the grouping of shares in oc web.

Is grouping generally desired? (see screenshot below)

It seems to use file_target for grouping outgoing shares which seems wrong.
I would suggest using the fileID for grouping shares together.

Screenshot (wrong attribute but display makes sense)

1645561185096

Response (wrong backend behavior)

{
    "ocs": {
        "meta": {
            "status": "ok",
            "statuscode": 100,
            "message": "OK"
        },
        "data": [
            {
                "id": "NsluGoraTkVJksl",
                "share_type": 3,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645544142,
                "parent": "",
                "expiration": "",
                "token": "IAZWlHamyjDeMWu",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!b19ea6fc-21a8-4a3a-9346-cc226adf15c7",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!b19ea6fc-21a8-4a3a-9346-cc226adf15c7",
                "file_parent": "",
                "file_target": "/DSC04184.JPG",
                "share_with_additional_info": "",
                "mail_send": 0,
                "name": "Quick-Action-Link",
                "url": "https://localhost:9200/#/s/IAZWlHamyjDeMWu"
            },
            {
                "id": "uYhDZllDCbtwCKD",
                "share_type": 3,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645544137,
                "parent": "",
                "expiration": "",
                "token": "wqeIEYqVnEueUSy",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_parent": "",
                "file_target": "/DSC04184.JPG",
                "share_with_additional_info": "",
                "mail_send": 0,
                "name": "Quick-Action-Link",
                "url": "https://localhost:9200/#/s/wqeIEYqVnEueUSy"
            },
            {
                "id": "e628709b-b913-4914-bc89-1cea060cad86",
                "share_type": 0,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645545111,
                "parent": "",
                "expiration": "",
                "token": "",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/Shares/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_parent": "",
                "file_target": "/Shares/DSC04184.JPG",
                "share_with": "einstein",
                "share_with_displayname": "Albert Einstein",
                "share_with_additional_info": "[email protected]",
                "mail_send": 0,
                "name": ""
            },
            {
                "id": "8be33b64-ee8a-4b0f-9180-099d7acc6b22",
                "share_type": 0,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645546038,
                "parent": "",
                "expiration": "",
                "token": "",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week",
                "item_type": "folder",
                "mimetype": "httpd/unix-directory",
                "storage_id": "shared::/Shares/ocis-hack-week",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!14a87e54-22ee-4316-a29a-5e9e3fb5bc7f",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!14a87e54-22ee-4316-a29a-5e9e3fb5bc7f",
                "file_parent": "",
                "file_target": "/Shares/ocis-hack-week",
                "share_with": "einstein",
                "share_with_displayname": "Albert Einstein",
                "share_with_additional_info": "[email protected]",
                "mail_send": 0,
                "name": ""
            }
        ]
    }
}

It seems to use "file_target": "/Shares/DSC04184.JPG", as grouping attribute. The value makes no sense on the public link share. My pull request changes that.

Response (Right backend behavior)

{
    "ocs": {
        "meta": {
            "status": "ok",
            "statuscode": 100,
            "message": "OK"
        },
        "data": [
            {
                "id": "NsluGoraTkVJksl",
                "share_type": 3,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645544142,
                "parent": "",
                "expiration": "",
                "token": "IAZWlHamyjDeMWu",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!b19ea6fc-21a8-4a3a-9346-cc226adf15c7",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!b19ea6fc-21a8-4a3a-9346-cc226adf15c7",
                "file_parent": "",
                "file_target": "/DSC04184.JPG",
                "share_with_additional_info": "",
                "mail_send": 0,
                "name": "Quick-Action-Link",
                "url": "https://localhost:9200/#/s/IAZWlHamyjDeMWu"
            },
            {
                "id": "uYhDZllDCbtwCKD",
                "share_type": 3,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645544137,
                "parent": "",
                "expiration": "",
                "token": "wqeIEYqVnEueUSy",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_parent": "",
                "file_target": "/DSC04184.JPG",
                "share_with_additional_info": "",
                "mail_send": 0,
                "name": "Quick-Action-Link",
                "url": "https://localhost:9200/#/s/wqeIEYqVnEueUSy"
            },
            {
                "id": "e628709b-b913-4914-bc89-1cea060cad86",
                "share_type": 0,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645545111,
                "parent": "",
                "expiration": "",
                "token": "",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week/DSC04184.JPG",
                "item_type": "file",
                "mimetype": "image/jpeg",
                "storage_id": "shared::/Shares/DSC04184.JPG",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",
                "file_parent": "",
                "file_target": "/Shares/DSC04184.JPG",
                "share_with": "einstein",
                "share_with_displayname": "Albert Einstein",
                "share_with_additional_info": "[email protected]",
                "mail_send": 0,
                "name": ""
            },
            {
                "id": "8be33b64-ee8a-4b0f-9180-099d7acc6b22",
                "share_type": 0,
                "uid_owner": "marie",
                "displayname_owner": "Marie Curie",
                "additional_info_owner": "[email protected]",
                "permissions": 1,
                "stime": 1645546038,
                "parent": "",
                "expiration": "",
                "token": "",
                "uid_file_owner": "marie",
                "displayname_file_owner": "Marie Curie",
                "additional_info_file_owner": "[email protected]",
                "state": 0,
                "path": "/ocis-hack-week",
                "item_type": "folder",
                "mimetype": "httpd/unix-directory",
                "storage_id": "shared::/Shares/ocis-hack-week",
                "storage": 0,
                "item_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!14a87e54-22ee-4316-a29a-5e9e3fb5bc7f",
                "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!14a87e54-22ee-4316-a29a-5e9e3fb5bc7f",
                "file_parent": "",
                "file_target": "/Shares/ocis-hack-week",
                "share_with": "einstein",
                "share_with_displayname": "Albert Einstein",
                "share_with_additional_info": "[email protected]",
                "mail_send": 0,
                "name": ""
            }
        ]
    }
}

Bottom line is, it should use "file_source": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c!fcf23326-1906-4bf6-a82c-3e337338965d",. as a grouping attribute.

FYI @dschmidt @butonic @kulmann @phil-davis

Originally posted by @micbar in owncloud/ocis#2462 (comment)

@kulmann
Copy link
Contributor

kulmann commented Mar 3, 2022

file_source is a good fit for the grouping 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants