Clients shall be able to list all their groupfolders
As we want to make groupfolders more visible, clients need an API to have all groupfolders listed. As groupfolders are folders, I think best is to have output similar to webdav results.
So either we have a separate API within groupfolders, or we extend webdav SEARCH to be able to retrieve (in a fast way) all groupfolders.
https://docs.nextcloud.com/server/latest/developer_manual/client_apis/WebDAV/search.html#supported-dav-properties
- [x] Web https://github.com/nextcloud/groupfolders/pull/2326
- [ ] extend API documentation if needed
@icewind1991 as you have also in depth knowledge on search (performance), can you judge what is easier?
A dav endpoint probably makes the most sense
I think a capability, indicating if current user has any groupfolders set up, is needed. As then clients can directly show/hide groupfolder entry (same for web). Or do we want to have this always visible and then "no groupfolders set up"?
As this is probably only useful for bigger instances/company, it would clutter interface. What do you think? @jancborchardt
Yeah if no groupfolders are set up it does not make sense to show an entry. Reason being that regular accounts can not create any, only admins can.
A dav endpoint probably makes the most sense
How will this then work? Will same folder /groupfolder in files and groupfolders endpoint have the same info and ids? Currently none of our clients have option to "browse" another endpoint.
To save time on clients, I think it must be either in existing webdav, or it is just a folder list within groupfolder API. This can then be retrieved and shown to user. Upon click of such an entry clients can browse to this path, using normal webdav.
I spoke with Desktop and a separate webdav endpoint is also too much overhead on their side.
I think it is best to extend current API to also list info for non-admin:
curl --request GET \
--url 'http://localhost/nc/index.php/apps/groupfolders/folders?format=json' \
--header 'OCS-APIRequest: true' \
Result is:
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 100,
"message": "OK",
"totalitems": "",
"itemsperpage": ""
},
"data": {
"1": {
"id": 1,
"mount_point": "subfolder\/groupFolder",
"groups": {
"e2e": 31
},
"quota": -3,
"size": 0,
"acl": false,
"manage": []
}
}
}
}
Resuilt is a bit too much overhead for us, but to simplify it on app side, it is okay to have this, as we then simply ignore it :)
https://github.com/nextcloud/groupfolders/pull/2327 adds non-admin access to the current API.
I was already mostly done with the DAV api before reading the above: https://github.com/nextcloud/groupfolders/pull/2326
I was already mostly done with the DAV api before reading the above: #2326
I am really sorry :S
I think a capability, indicating if current user has any groupfolders set up, is needed.
Yeah if no groupfolders are set up it does not make sense to show an entry. Reason being that regular accounts can not create any, only admins can.
@icewind1991 can you add such capability? Something like:
"groupfolders": {
"hasAccessibleFolders": "true|false"
}
@icewind1991 can you add such capability?
https://github.com/nextcloud/groupfolders/pull/2328
extend API documentation if needed
anything that needs to be done here @icewind1991 ? If no please tick the box, else a docs PR is needed. Thanks in advance
It seems there were two new endpoints after the PR:
https://github.com/nextcloud/groupfolders/blob/691b04cb52b197c79787973442c092ce6ad99168/lib/DAV/PropFindPlugin.php#L22
https://github.com/nextcloud/groupfolders/blob/691b04cb52b197c79787973442c092ce6ad99168/lib/DAV/PropFindPlugin.php#L23
@tobiasKaminsky I think we can close this now?