Skip to content

Commit

Permalink
fix: remove namespace creation restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
Vafilor committed Oct 28, 2021
1 parent dd3d7f6 commit 2cddf4a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions server/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ func getClient(ctx context.Context, kubeConfig *v1.Config, db *v1.DB, sysConfig
}

func IsAuthorized(c *v1.Client, namespace, verb, group, resource, name string) (allowed bool, err error) {
if resource == "namespaces" && verb == "create" {
return false, status.Error(codes.PermissionDenied, "creating namespaces is not supported in the community edition")
}

review, err := c.AuthorizationV1().SelfSubjectAccessReviews().Create(&authorizationv1.SelfSubjectAccessReview{
Spec: authorizationv1.SelfSubjectAccessReviewSpec{
ResourceAttributes: &authorizationv1.ResourceAttributes{
Expand Down

0 comments on commit 2cddf4a

Please sign in to comment.