feat: automatically create a teamfolder upon team creation - #2675
feat: automatically create a teamfolder upon team creation#2675stediefan wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
eea615b to
a52e6da
Compare
feat: introduce a function to upgrade existing teams to include the special teamfolder feat: add settings page to configure a default quota for new teamfolders Assisted by: GitHub Copilot:Claude Sonnet 5 Assisted by: GitHub Copilot:GPT-5.6 Terra Assisted by: GitHub Copilot:Kimi K2.7 Code Signed-off-by: Stefan Dietrich <5716289+stediefan@users.noreply.github.com>
a52e6da to
6ab835a
Compare
| } | ||
| } | ||
|
|
||
| private function requireMember(string $circleId): void { |
There was a problem hiding this comment.
Just to make it more explicit. Same with the two other methods.
| private function requireMember(string $circleId): void { | |
| private function assertAuthenticatedUserIsMember(string $circleId): void { |
| * @return list<string> | ||
| */ | ||
| private function filterExistingCircleColumns(array $fields): array { | ||
| static $columns = null; |
There was a problem hiding this comment.
Is a static variable really needed? IIRC, we are trying to get rid of them.
| * @param list<string> $fields | ||
| * @return list<string> | ||
| */ | ||
| private function filterExistingCircleColumns(array $fields): array { |
There was a problem hiding this comment.
What's the goal of this method?
| } | ||
|
|
||
| $circle = $event->getCircle(); | ||
| $provider->unlinkTeamFolder($circle->getSingleId()); |
There was a problem hiding this comment.
Will the team folder be visible to an admin to be deleted afterward?
| * | ||
| * Implementation: {@see TeamFolderService} in the circles app. | ||
| */ | ||
| interface TeamFolderPolicy { |
There was a problem hiding this comment.
| interface TeamFolderPolicy { | |
| interface ITeamFolderPolicy { |
| * The Groupfolders provider owns the durable `team_circle_id` linkage. Circles | ||
| * never persists a Groupfolders identifier. | ||
| */ | ||
| class TeamFolderService implements TeamFolderPolicy { |
There was a problem hiding this comment.
| class TeamFolderService implements TeamFolderPolicy { | |
| class TeamFolderPolicy implements ITeamFolderPolicy { |
| * The `@nextcloud/files` Node class exposes the same public interface, but | ||
| * TypeScript requires us to keep the private fields when using the class | ||
| * type directly. Using our own interface keeps the template code simple. | ||
| */ |
There was a problem hiding this comment.
I am not sure to get that comment. What was the problem?
I think nowadays, we are using the INode, IFile, IFolder interface instead of the classes. Maybe that would help.
| function bytesToMb(bytes: number): string { | ||
| if (bytes === 0) { | ||
| return '0' | ||
| } | ||
| const mb = bytes / BYTES_PER_MB | ||
| return String(parseFloat(mb.toFixed(2))) | ||
| } |
There was a problem hiding this comment.
Maybe this function can help here: https://nextcloud-libraries.github.io/nextcloud-files/functions/index.formatFileSize.html
feat: introduce a function to upgrade existing teams to include the special teamfolder
feat: add settings page to configure a default quota for new teamfolders
Assisted by: GitHub Copilot:Claude Sonnet 5
Assisted by: GitHub Copilot:GPT-5.6 Terra
Assisted by: GitHub Copilot:Kimi K2.7 Code
Summary
This is a aggregated feature that integrates teams with teamfolders. The teams feature aims to provide a space for team owned apps. This provides the base as the linked groupfolder is the proposed solution.
TODO
Checklist
The newly introduced feature to set a default Quota for the auto created folders:
see todo
no
3. to review, feature component)stable32)AI (if applicable)