Skip to content

Commit

Permalink
Add user annotations for skipping ents and grants
Browse files Browse the repository at this point in the history
  • Loading branch information
martinalbert committed Aug 11, 2023
1 parent f5f680a commit a037eee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var (
Traits: []v2.ResourceType_Trait{
v2.ResourceType_TRAIT_USER,
},
Annotations: annotationsForUserResourceType(),
}
resourceTypeTeam = &v2.ResourceType{
Id: "team",
Expand Down
7 changes: 7 additions & 0 deletions pkg/connector/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package connector
import (
"github.com/conductorone/baton-hubspot/pkg/hubspot"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
"github.com/conductorone/baton-sdk/pkg/annotations"
"github.com/conductorone/baton-sdk/pkg/pagination"
"golang.org/x/text/cases"
"golang.org/x/text/language"
Expand All @@ -11,6 +12,12 @@ import (
var ResourcesPageSize = 50
var titleCaser = cases.Title(language.English)

func annotationsForUserResourceType() annotations.Annotations {
annos := annotations.Annotations{}
annos.Update(&v2.SkipEntitlementsAndGrants{})
return annos
}

func parsePageToken(i string, resourceID *v2.ResourceId) (*pagination.Bag, error) {
b := &pagination.Bag{}
err := b.Unmarshal(i)
Expand Down

0 comments on commit a037eee

Please sign in to comment.