Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TAG := $(shell git rev-list --tags --max-count=1)
VERSION := $(shell git describe --tags ${TAG})
.PHONY: build check fmt lint test test-race vet test-cover-html help install proto admin-app compose-up-dev
.DEFAULT_GOAL := build
PROTON_COMMIT := "3acffc58e07cdfdc080d041f4a1bdb5e8545bbd5"
PROTON_COMMIT := "b891167da54d774968538c9261091899026e1825"

admin-app:
@echo " > generating admin build"
Expand Down
6 changes: 3 additions & 3 deletions internal/api/v1beta1connect/user_pat.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func transformPATToPB(pat models.PAT, patValue string) *frontierv1beta1.PAT {
return pbPAT
}

func (h *ConnectHandler) ListCurrentUserPATs(ctx context.Context, request *connect.Request[frontierv1beta1.ListCurrentUserPATsRequest]) (*connect.Response[frontierv1beta1.ListCurrentUserPATsResponse], error) {
func (h *ConnectHandler) SearchCurrentUserPATs(ctx context.Context, request *connect.Request[frontierv1beta1.SearchCurrentUserPATsRequest]) (*connect.Response[frontierv1beta1.SearchCurrentUserPATsResponse], error) {
errorLogger := NewErrorLogger()

principal, err := h.GetLoggedInPrincipal(ctx)
Expand All @@ -356,7 +356,7 @@ func (h *ConnectHandler) ListCurrentUserPATs(ctx context.Context, request *conne

result, err := h.userPATService.List(ctx, userID, request.Msg.GetOrgId(), rqlQuery)
if err != nil {
errorLogger.LogServiceError(ctx, request, "ListCurrentUserPATs", err,
errorLogger.LogServiceError(ctx, request, "SearchCurrentUserPATs", err,
zap.String("user_id", userID),
zap.String("org_id", request.Msg.GetOrgId()))

Expand All @@ -373,7 +373,7 @@ func (h *ConnectHandler) ListCurrentUserPATs(ctx context.Context, request *conne
pbPATs = append(pbPATs, transformPATToPB(pat, ""))
}

return connect.NewResponse(&frontierv1beta1.ListCurrentUserPATsResponse{
return connect.NewResponse(&frontierv1beta1.SearchCurrentUserPATsResponse{
Pats: pbPATs,
Pagination: &frontierv1beta1.RQLQueryPaginationResponse{
Offset: uint32(result.Page.Offset),
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/connect_interceptors/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,8 @@ var authorizationValidationMap = map[string]func(ctx context.Context, handler *v
pbreq := req.(*connect.Request[frontierv1beta1.CreateCurrentUserPATRequest])
return handler.IsAuthorized(ctx, relation.Object{Namespace: schema.OrganizationNamespace, ID: pbreq.Msg.GetOrgId()}, schema.GetPermission, req)
},
frontierv1beta1connect.FrontierServiceListCurrentUserPATsProcedure: func(ctx context.Context, handler *v1beta1connect.ConnectHandler, req connect.AnyRequest) error {
pbreq := req.(*connect.Request[frontierv1beta1.ListCurrentUserPATsRequest])
frontierv1beta1connect.FrontierServiceSearchCurrentUserPATsProcedure: func(ctx context.Context, handler *v1beta1connect.ConnectHandler, req connect.AnyRequest) error {
pbreq := req.(*connect.Request[frontierv1beta1.SearchCurrentUserPATsRequest])
return handler.IsAuthorized(ctx, relation.Object{Namespace: schema.OrganizationNamespace, ID: pbreq.Msg.GetOrgId()}, schema.GetPermission, req)
},

Expand Down
Loading
Loading