Skip to content

feat(teamspace): resolve teams for files inside a team folder - #5035

Draft
pringelmann wants to merge 1 commit into
masterfrom
feat/team-folder-teams-reverse-lookup
Draft

feat(teamspace): resolve teams for files inside a team folder#5035
pringelmann wants to merge 1 commit into
masterfrom
feat/team-folder-teams-reverse-lookup

Conversation

@pringelmann

Copy link
Copy Markdown

Open a team folder in Files and the sidebar shows no team. Same for any file inside it. Circles resolves teams from share rows, but a team folder arrives as a mount, so there is nothing to find.

TeamSpaceProvider now implements ITeamFileResourceProvider (nextcloud/server#6344):

  • getTeamsForFile() locates the file's group folder through the user mount cache, then returns the circles assigned to it. Works at the mount root and at any depth below it.
  • getTeamsForResource() used to return an empty array. It now answers for a folder id, which is what the Teams app passes.

Circles are read from both places a folder can be linked to one: team_circle_id for a team space, and circle rows in group_folders_groups for a regular folder shared with a team.

Verified against a team folder root, a nested folder, a circle-shared folder, and an unrelated folder.

Depends on nextcloud/server#63444 and nextcloud/circles#2790.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (tests)

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant