Skip to content

Commit

Permalink
Merge pull request #224 from nais/repoauth
Browse files Browse the repository at this point in the history
Regenerate API proto and dereference removed field
  • Loading branch information
jhrv committed Jun 27, 2024
2 parents 049ad8a + 8f6f6a2 commit 36f87b6
Show file tree
Hide file tree
Showing 7 changed files with 257 additions and 300 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ K8S_VERSION := 1.27.1
LAST_COMMIT = $(shell git rev-parse --short HEAD)
VERSION ?= $(DATE)-$(LAST_COMMIT)
LDFLAGS := -X github.com/nais/deploy/pkg/version.Revision=$(LAST_COMMIT) -X github.com/nais/deploy/pkg/version.Date=$(DATE) -X github.com/nais/deploy/pkg/version.BuildUnixTime=$(BUILDTIME)
NAIS_API_COMMIT_SHA := 0f2590f0befcdc5473474007174bb4a5d0b1f97e
NAIS_API_COMMIT_SHA := e1c532d516dfdd586dc98e6f7e5275d91c53dcf5
NAIS_API_TARGET_DIR=pkg/naisapi/protoapi
arch := $(shell uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
os := $(shell uname -s | tr '[:upper:]' '[:lower:]')
Expand Down
5 changes: 2 additions & 3 deletions pkg/naisapi/naisapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ func NewClient(target string, insecureConnection bool) (*Client, error) {

func (c *Client) IsAuthorized(ctx context.Context, repo, team string) bool {
resp, err := c.client.IsRepositoryAuthorized(ctx, &protoapi.IsRepositoryAuthorizedRequest{
TeamSlug: team,
Repository: repo,
Authorization: protoapi.RepositoryAuthorization_DEPLOY,
TeamSlug: team,
Repository: repo,
})
if err != nil {
log.WithError(err).Error("checking repo authorization in teams")
Expand Down
2 changes: 1 addition & 1 deletion pkg/naisapi/protoapi/pagination.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

542 changes: 250 additions & 292 deletions pkg/naisapi/protoapi/teams.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/naisapi/protoapi/teams_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/naisapi/protoapi/users.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/naisapi/protoapi/users_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 36f87b6

Please sign in to comment.