mirror of
https://github.com/onepanelio/onepanel.git
synced 2024-08-21 00:00:34 +08:00
fix: remove namespace creation restriction
This commit is contained in:
parent
dd3d7f6632
commit
2cddf4a88a
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user