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

Implement team provider api #43855

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Implement team provider api #43855

merged 1 commit into from
Mar 5, 2024

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Feb 27, 2024

Resolves #43683

Teams are considered evolution of circles where we now want to aggregate all resources that are related (shared or owned) by a given team. Therefore we need a generic API so that apps that offer sharing to teams can expose the list of resources and teams for a given resource.

Example implementation can be found for deck and collectives already.

In the future we may extend this namespace to become a stable OCP/OCS API for other methods related to circles which for now is still bound to the classes in OCA\Circles.

ToDo

  • Verify team membership
  • API documentation (openapi, phpdoc, dev docs)
    • phpdoc: Define that resources should be returned in order of importance (e.g. folders before files)
    • phpdoc: Clarify order of icons
    • OpenAPI spec
    • Developer docs

Provider implementations

core/Controller/TeamsApiController.php Fixed Show fixed Hide fixed
core/Controller/TeamsApiController.php Fixed Show fixed Hide fixed
core/Controller/TeamsApiController.php Fixed Show fixed Hide fixed
core/Controller/TeamsApiController.php Fixed Show fixed Hide fixed
lib/private/Teams/TeamManager.php Fixed Show fixed Hide fixed
lib/private/Teams/TeamManager.php Fixed Show fixed Hide fixed
lib/private/Teams/TeamManager.php Fixed Show fixed Hide fixed
lib/private/Teams/TeamManager.php Fixed Show fixed Hide fixed
lib/private/Teams/TeamManager.php Fixed Show fixed Hide fixed
lib/private/Teams/TeamManager.php Fixed Show fixed Hide fixed
lib/private/Teams/TeamManager.php Fixed Show fixed Hide fixed
lib/public/Teams/Team.php Fixed Show fixed Hide fixed
@juliushaertl juliushaertl force-pushed the feat/team-provider branch 4 times, most recently from d454c55 to f4c3882 Compare March 1, 2024 11:42
@juliushaertl juliushaertl changed the title wip: Implement team provider api Implement team provider api Mar 1, 2024
@juliushaertl juliushaertl marked this pull request as ready for review March 1, 2024 11:49
@juliushaertl juliushaertl requested review from a team, ArtificialOwl, Fenn-CS and sorbaugh and removed request for a team March 1, 2024 11:49
@juliushaertl juliushaertl added enhancement 3. to review Waiting for reviews labels Mar 1, 2024
@juliushaertl juliushaertl added this to the Nextcloud 29 milestone Mar 1, 2024
@juliushaertl juliushaertl force-pushed the feat/team-provider branch 2 times, most recently from 75c86ef to 276cff1 Compare March 1, 2024 12:12
Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some detail findings (that partly I would have expected to be found by CI). In general, everything is layed out fine 👍

apps/files_sharing/lib/FilesTeamResourceProvider.php Outdated Show resolved Hide resolved
core/Controller/TeamsApiController.php Outdated Show resolved Hide resolved
lib/public/Teams/ITeamManager.php Outdated Show resolved Hide resolved
lib/public/Teams/ITeamManager.php Outdated Show resolved Hide resolved
lib/private/Teams/TeamManager.php Outdated Show resolved Hide resolved
lib/public/Teams/ITeamManager.php Outdated Show resolved Hide resolved
lib/private/Teams/TeamManager.php Outdated Show resolved Hide resolved
lib/private/Teams/TeamManager.php Outdated Show resolved Hide resolved
core/Controller/TeamsApiController.php Outdated Show resolved Hide resolved
core/Controller/TeamsApiController.php Show resolved Hide resolved
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenAPI LGTM

core/ResponseDefinitions.php Show resolved Hide resolved
@juliushaertl juliushaertl force-pushed the feat/team-provider branch 2 times, most recently from 9b181e5 to 82b08ab Compare March 4, 2024 12:26
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenAPI is good

core/Controller/TeamsApiController.php Fixed Show fixed Hide fixed
core/Controller/TeamsApiController.php Fixed Show fixed Hide fixed
core/Controller/TeamsApiController.php Fixed Show fixed Hide fixed
@juliushaertl juliushaertl force-pushed the feat/team-provider branch 3 times, most recently from 7123a1c to 3ca15ba Compare March 4, 2024 22:05
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl
Copy link
Member Author

Cypress failure is unrelated

@juliushaertl juliushaertl merged commit ad8cb2c into master Mar 5, 2024
158 of 160 checks passed
@juliushaertl juliushaertl deleted the feat/team-provider branch March 5, 2024 10:57
@juliushaertl juliushaertl mentioned this pull request Mar 5, 2024
28 tasks
@blizzz blizzz mentioned this pull request Mar 7, 2024
@joshtrichards
Copy link
Member

joshtrichards commented May 23, 2024

Does this mean we need to add the Circles app to alwaysEnabled (as a shipped app) due to the tight coupling? (#45484 brought this up today).

@blizzz
Copy link
Member

blizzz commented May 23, 2024

Does this mean we need to add the Circles app to alwaysEnabled (as a shipped app) due to the tight coupling? (#45484 brought this up today).

One way to solve it, I'd rather say we need a NullProvider sort of things, provided it does not lead to odd effects/assumptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API for teams
4 participants