mirror of
https://github.com/fleetdm/fleet
synced 2026-05-06 06:48:54 +00:00
For #27281 This PR adds `/api/{version}/fleet/scim/details` endpoint, along with some frontend fixes. # Checklist for submitter - [x] If database migrations are included, checked table schema to confirm autoupdate - For database migrations: - [x] Checked schema for all modified table for columns that will auto-update timestamps during migration. - [x] Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects. - [x] Ensured the correct collation is explicitly set for character columns (`COLLATE utf8mb4_unicode_ci`). - [x] Added/updated automated tests - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality
24 lines
699 B
Go
24 lines
699 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
"github.com/fleetdm/fleet/v4/server/service/contract"
|
|
)
|
|
|
|
func getScimDetailsEndpoint(ctx context.Context, _ interface{}, svc fleet.Service) (fleet.Errorer, error) {
|
|
details, err := svc.ScimDetails(ctx)
|
|
if err != nil {
|
|
return contract.ScimDetailsResponse{Err: err}, nil
|
|
}
|
|
return contract.ScimDetailsResponse{
|
|
ScimDetails: details,
|
|
}, nil
|
|
}
|
|
|
|
func (svc *Service) ScimDetails(ctx context.Context) (fleet.ScimDetails, error) {
|
|
// skipauth: No authorization check needed due to implementation returning only license error.
|
|
svc.authz.SkipAuthorization(ctx)
|
|
return fleet.ScimDetails{}, fleet.ErrMissingLicense
|
|
}
|