Skip to content

Proposal: Remove OwnerID Filter from Dashboard List Swagger #19523

Open
@GeorgeMac

Description

@GeorgeMac

See: https://github.com/influxdata/influxdb/blob/master/http/swagger.yml#L2398-L2402

Internally we do not expose that dashboards can be listed by owners.
Because of this, there is some URM interaction in the http handler for the dashboard service.
We are actively removing all URM interactions for services external to tenant.

if req.ownerID != nil {
filter := influxdb.UserResourceMappingFilter{
UserID: *req.ownerID,
UserType: influxdb.Owner,
ResourceType: influxdb.DashboardsResourceType,
}
mappings, _, err := h.UserResourceMappingService.FindUserResourceMappings(ctx, filter)
if err != nil {
h.HandleHTTPError(ctx, &influxdb.Error{
Code: influxdb.EInternal,
Msg: "Error loading dashboard owners",
Err: err,
}, w)
return
}
for _, mapping := range mappings {
req.filter.IDs = append(req.filter.IDs, &mapping.ResourceID)
}
}

I propose we remove both these parts. Contributing further towards keeping resource organization scoped for now.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions