fix(authorizer): do not nead read action while writing to scrapers

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
pull/11236/head
Leonardo Di Donato 2019-01-18 14:10:37 +01:00 committed by Kelvin Wang
parent f0838e4c71
commit 04e541bf06
1 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ func (s *ScraperTargetStoreService) AddTarget(ctx context.Context, st *influxdb.
// UpdateTarget checks to see if the authorizer on context has write access to the scraper target provided.
func (s *ScraperTargetStoreService) UpdateTarget(ctx context.Context, upd *influxdb.ScraperTarget) (*influxdb.ScraperTarget, error) {
st, err := s.GetTargetByID(ctx, upd.ID)
st, err := s.s.GetTargetByID(ctx, upd.ID)
if err != nil {
return nil, err
}
@ -123,7 +123,7 @@ func (s *ScraperTargetStoreService) UpdateTarget(ctx context.Context, upd *influ
// RemoveTarget checks to see if the authorizer on context has write access to the scraper target provided.
func (s *ScraperTargetStoreService) RemoveTarget(ctx context.Context, id influxdb.ID) error {
st, err := s.GetTargetByID(ctx, id)
st, err := s.s.GetTargetByID(ctx, id)
if err != nil {
return err
}