Feature: Implement Backend API Endpoints for Resource Sharing & Group Management #106
Labels
No labels
Epic 5
MCP
P1
PR-0
PR-1
api
api-layer
architecture
area:backend
area:frontend
arrow
authentication
backend
bug
chat
client
clipboard
common-module
compose
cross-cutting
cross-cutting-requirement
data-layer
data-models
database
desktop-client
documentation
duplicate
enhancement
epic
epic-1
epic-2
epic-3
epic-4
epic-5
epic-6
epic-7
epic-llm-config
error-handling
feature
frontend
good first issue
help wanted
implementation
infrastructure
installer
invalid
kotlin
ktor
llm
medium-priority
message
multiplatform
needs-review
needs-triage
packaging
performance
phase-1
phase-2
phase-3
phase-4
phase-5
phase3
phase:3
priority: high
question
refactor
refactoring
resource-sharing
security
server
server-module
services
session
session-management
settings
setup
shutdown
state
storage
streaming
sub-issue
tests
tooling
type:task
ui
ui/ux
user-accounts
user-management
ux
viewmodel
websocket
windows
windows-integration
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Torvian.eu/chatbot#106
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature: Implement Backend API Endpoints for Resource Sharing & Group Management
Issue Type: Feature / Backend
Priority: High
Description
The core backend infrastructure for resource sharing and access control (authentication, authorization, ownership, group-based access) for providers, models, and settings is complete as per the Phase 3 Backend Readiness Report. However, the API layer required for the frontend to manage these features is currently missing. This issue tracks the implementation of these critical backend API endpoints.
Without these endpoints, the frontend cannot:
This issue aims to address the "Critical Backend Gaps" identified in the report, following the recommended implementation priority.
Tasks & Implementation Priorities
The following tasks are prioritized to unblock frontend development:
Priority 1: User Group Management Endpoints ⚠️ CRITICAL
Estimated Duration: 1-2 days
Description: Implement a comprehensive set of API endpoints for managing user groups and their memberships. This is critical as user groups are the foundation for resource sharing.
Missing Routes to Implement:
GET /api/v1/user-groups: List all user groups.POST /api/v1/user-groups: Create a new user group.GET /api/v1/user-groups/{id}: Retrieve details for a specific user group.PUT /api/v1/user-groups/{id}: Update an existing user group's name or description.DELETE /api/v1/user-groups/{id}: Delete a user group (with protection for special groups like "All Users").GET /api/v1/user-groups/{id}/members: List all members of a specific user group.POST /api/v1/user-groups/{id}/members: Add a user to a specific user group.DELETE /api/v1/user-groups/{id}/members/{userId}: Remove a user from a specific user group.Implementation Notes:
server/src/main/kotlin/eu/torvian/chatbot/server/routes/configureUserGroupRoutes.ktAuthSchemes.USER_JWT) and authorization (e.g.,MANAGE_USER_GROUPSpermission for CRUD operations).Priority 2: Resource Access Management Endpoints ⚠️ HIGH
Estimated Duration: 2-3 days
Description: Implement API endpoints to grant, revoke, and query access for user groups to providers, models, and settings. This is the core functionality for resource sharing.
Missing Routes to Implement:
POST /api/v1/providers/{id}/access: Grant a specific access mode (e.g., READ, WRITE) to a user group for a provider.DELETE /api/v1/providers/{id}/access: Revoke a specific access mode from a user group for a provider.GET /api/v1/providers/{id}/access: List all user groups that have any access to a provider, along with their access modes./api/v1/models/{id}/access)/api/v1/settings/{id}/access)Implementation Notes:
configureProviderRoutes.kt,configureModelRoutes.kt, andconfigureSettingsRoutes.ktfiles.LlmProviderService,LlmModelService,ModelSettingsService) to wrap the ProviderAccessDao, ModelAccessDao, and SettingsAccessDao operations.Priority 3: Convenience Endpoints (Make Public/Private) 📊 MEDIUM
Estimated Duration: 1 day
Description: Implement convenience endpoints to easily toggle the public/private status of resources. These endpoints will internally use the grant/revoke access logic with the "All Users" group.
Missing Routes to Implement:
POST /api/v1/providers/{id}/make-public: GrantREADaccess to the "All Users" group for a provider.POST /api/v1/providers/{id}/make-private: RevokeREADaccess from the "All Users" group for a provider.GET /api/v1/providers/{id}/is-public: Check if a provider is public (i.e., "All Users" group hasREADaccess)./api/v1/models/{id})/api/v1/settings/{id})Implementation Notes:
makeProviderPublic,makeProviderPrivate,isProviderPublic) that leverage the UserGroupService to get the "All Users" group and then call the resource access management service methods.Priority 4: Ownership Information Endpoints 📊 MEDIUM
Estimated Duration: 0.5 day
Description: Implement endpoints to retrieve the owner information for a given resource.
Missing Routes to Implement:
GET /api/v1/providers/{id}/owner: Get the user details of the owner of a provider.GET /api/v1/models/{id}/owner: Get the user details of the owner of a model.GET /api/v1/settings/{id}/owner: Get the user details of the owner of a settings profile.Implementation Notes:
getProviderOwner,getModelOwner,getSettingsOwner) that use the respective Ownership DAOs to retrieve the owner ID and then fetch user details from theUserService.Acceptance Criteria
AuthSchemes.USER_JWT) and authorization standards.Eitherfor results andcall.respondEither).Labels
backend,api,feature,priority: high,phase3