From 2adfd34c5d53053c9a889751df2632cbc3c4bbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marina=20Jak=C4=8Din?= Date: Mon, 21 Aug 2023 16:16:37 +0200 Subject: [PATCH] add user annos --- pkg/connector/connector.go | 1 + pkg/connector/helpers.go | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/pkg/connector/connector.go b/pkg/connector/connector.go index c6c009a3..39814236 100644 --- a/pkg/connector/connector.go +++ b/pkg/connector/connector.go @@ -24,6 +24,7 @@ var ( Traits: []v2.ResourceType_Trait{ v2.ResourceType_TRAIT_USER, }, + Annotations: annotationsForUserResourceType(), } resourceTypeWorkspace = &v2.ResourceType{ Id: "workspace", diff --git a/pkg/connector/helpers.go b/pkg/connector/helpers.go index 838905f0..716c2954 100644 --- a/pkg/connector/helpers.go +++ b/pkg/connector/helpers.go @@ -2,6 +2,7 @@ package connector import ( v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" + "github.com/conductorone/baton-sdk/pkg/annotations" "github.com/conductorone/baton-sdk/pkg/pagination" ) @@ -21,3 +22,9 @@ func parsePageToken(i string, resourceID *v2.ResourceId) (*pagination.Bag, error return b, nil } + +func annotationsForUserResourceType() annotations.Annotations { + annos := annotations.Annotations{} + annos.Update(&v2.SkipEntitlementsAndGrants{}) + return annos +}