Skip to content

A way to reference Team Folders by external_id #4723

@sistason

Description

@sistason

Is your feature request related to a problem? Please describe.
I operate a Nextcloud in a coupled environment where when I create a group in another SSO-App, this group will get created in Nextcloud and a Team Folder is being created for them. At the same time, if the group gets deleted/renamed in the SSO, the groupfolder should follow.

As this requires referencing the groupfolder with the group of the SSO, I'd need a way to set some sort of external_id for the groupfolder.

Currently, there is no such way, which requires me to automate groupfolders-sync by having folder_id==SSO-id, requiring direct database access and manipulation. This has code smell and makes me unhappy, as a lot of things can break doing that (although this is stable in production for 3 years now)

Describe the solution you'd like
I can think of two options:

  • Add an external_id field to the oc_groupfolders table and an OCS API endpoint for searching for groupfolders via this ID and updating this ID.
  • The options column could be used, but I have no idea if this gets overwritten by something in some cases and/or I could inject keys unknown to the groupfolders-app. An OCS API endpoint for updating the options is missing, but I could do a PR for that if that would be a thing that would be approved.

Describe alternatives you've considered
I can just keep directly mingling in the oc_groupfolders table with scripts...

I just wanted to check if there is a better way or I can contribute a step towards a better way :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions