2021-03-18 04:59:00 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2021-05-12 17:38:00 +00:00
|
|
|
"encoding/json"
|
2021-03-18 04:59:00 +00:00
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
"github.com/fleetdm/fleet/server/fleet"
|
2021-03-18 04:59:00 +00:00
|
|
|
)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
func (svc *Service) NewTeam(ctx context.Context, p fleet.TeamPayload) (*fleet.Team, error) {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return nil, fleet.ErrMissingLicense
|
2021-03-18 04:59:00 +00:00
|
|
|
}
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
func (svc *Service) ModifyTeam(ctx context.Context, id uint, payload fleet.TeamPayload) (*fleet.Team, error) {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return nil, fleet.ErrMissingLicense
|
2021-05-12 17:38:00 +00:00
|
|
|
}
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
func (svc *Service) ModifyTeamAgentOptions(ctx context.Context, id uint, options json.RawMessage) (*fleet.Team, error) {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return nil, fleet.ErrMissingLicense
|
2021-03-18 04:59:00 +00:00
|
|
|
}
|
2021-04-06 18:40:14 +00:00
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
func (svc *Service) AddTeamUsers(ctx context.Context, teamID uint, users []fleet.TeamUser) (*fleet.Team, error) {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return nil, fleet.ErrMissingLicense
|
2021-04-22 03:54:09 +00:00
|
|
|
}
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
func (svc *Service) DeleteTeamUsers(ctx context.Context, teamID uint, users []fleet.TeamUser) (*fleet.Team, error) {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return nil, fleet.ErrMissingLicense
|
2021-04-22 03:54:09 +00:00
|
|
|
}
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
func (svc *Service) ListTeamUsers(ctx context.Context, teamID uint, opt fleet.ListOptions) ([]*fleet.User, error) {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return nil, fleet.ErrMissingLicense
|
2021-04-22 03:54:09 +00:00
|
|
|
}
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
func (svc *Service) ListTeams(ctx context.Context, opt fleet.ListOptions) ([]*fleet.Team, error) {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return nil, fleet.ErrMissingLicense
|
2021-04-06 18:40:14 +00:00
|
|
|
}
|
2021-04-20 17:20:52 +00:00
|
|
|
|
2021-06-01 00:07:51 +00:00
|
|
|
func (svc *Service) DeleteTeam(ctx context.Context, tid uint) error {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return fleet.ErrMissingLicense
|
2021-04-20 17:20:52 +00:00
|
|
|
}
|
2021-05-31 16:02:05 +00:00
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
func (svc *Service) TeamEnrollSecrets(ctx context.Context, teamID uint) ([]*fleet.EnrollSecret, error) {
|
2021-06-16 17:55:41 +00:00
|
|
|
// skipauth: No authorization check needed due to implementation returning
|
|
|
|
// only license error.
|
|
|
|
svc.authz.SkipAuthorization(ctx)
|
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
return nil, fleet.ErrMissingLicense
|
2021-05-31 16:02:05 +00:00
|
|
|
}
|