Skip to content

Commit

Permalink
Release v10.3.2-dev.ryan.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanclark committed Dec 5, 2022
1 parent 504d64c commit 5557a46
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Stable releases: "1.0.0"
# Pre-releases: "1.0.0-alpha.1", "1.0.0-beta.2", "1.0.0-rc.3"
# Master/dev branch: "1.0.0-dev"
VERSION=10.3.2
VERSION=10.3.2-dev.ryan.1

DOCKER_IMAGE_QUAY ?= quay.io/gravitational/teleport
DOCKER_IMAGE_ECR ?= public.ecr.aws/gravitational/teleport
Expand Down
2 changes: 1 addition & 1 deletion api/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package api

const (
Version = "10.3.2"
Version = "10.3.2-dev.ryan.1"
)

// Gitref variable is automatically set to the output of git-describe
Expand Down
2 changes: 1 addition & 1 deletion examples/chart/teleport-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.version: &version "10.3.2"
.version: &version "10.3.2-dev.ryan.1"

name: teleport-cluster
apiVersion: v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.version: &version "10.3.2"
.version: &version "10.3.2-dev.ryan.1"

name: teleport-operator
apiVersion: v2
Expand Down
2 changes: 1 addition & 1 deletion examples/chart/teleport-kube-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.version: &version "10.3.2"
.version: &version "10.3.2-dev.ryan.1"

name: teleport-kube-agent
apiVersion: v2
Expand Down
14 changes: 14 additions & 0 deletions lib/web/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package web

import (
"context"
"fmt"
"net/http"
"strings"

Expand All @@ -38,37 +39,50 @@ import (

// checkAccessToRegisteredResource checks if calling user has access to at least one registered resource.
func (h *Handler) checkAccessToRegisteredResource(w http.ResponseWriter, r *http.Request, p httprouter.Params, c *SessionContext, site reversetunnel.RemoteSite) (interface{}, error) {
fmt.Println("checkAccessToRegisteredResource")
// Get a client to the Auth Server with the logged in user's identity. The
// identity of the logged in user is used to fetch the list of resources.
clt, err := c.GetUserClient(site)
if err != nil {
fmt.Println("no bueno", err)
return nil, trace.Wrap(err)
}

fmt.Println("we are here")

resourceKinds := []string{types.KindNode, types.KindDatabaseServer, types.KindAppServer, types.KindKubeService, types.KindWindowsDesktop}
for _, kind := range resourceKinds {
fmt.Println("loop", kind)

res, err := clt.ListResources(r.Context(), proto.ListResourcesRequest{
ResourceType: kind,
Limit: 1,
})

if err != nil {
fmt.Println("that was an error", err)
// Access denied error is returned when user does not have permissions
// to read/list a resource kind which can be ignored as this function is not
// about checking if user has the right perms.
if trace.IsAccessDenied(err) {
fmt.Println("continuing")

continue
}

fmt.Println("not continuing")
return nil, trace.Wrap(err)
}

fmt.Println("here!")
if len(res.Resources) > 0 {
return checkAccessToRegisteredResourceResponse{
HasResource: true,
}, nil
}
}

fmt.Println("here2!")
return checkAccessToRegisteredResourceResponse{
HasResource: false,
}, nil
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package teleport

const (
Version = "10.3.2"
Version = "10.3.2-dev.ryan.1"
)

// Gitref variable is automatically set to the output of git-describe
Expand Down

0 comments on commit 5557a46

Please sign in to comment.