From 5d29e1ca6d96d20a60cf7db9e2c7aa723fb8ca17 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Sat, 4 Jan 2020 23:11:21 +0800 Subject: [PATCH] fix: fmt error --- pkg/compute/models/service_catalog.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/compute/models/service_catalog.go b/pkg/compute/models/service_catalog.go index f6bb31d77e..85e36c58f4 100644 --- a/pkg/compute/models/service_catalog.go +++ b/pkg/compute/models/service_catalog.go @@ -103,15 +103,15 @@ func (scm *SServiceCatalogManager) ValidateCreateData(ctx context.Context, userC return nil, err } /* - gt := model.(*SGuestTemplate) - //scope := rbacutils.String2Scope(gt.PublicScope) - //if !gt.IsPublic || scope != rbacutils.ScopeSystem { - // return nil, httperrors.NewForbiddenError("guest template must be public in scope system") - //} - if userCred.GetProjectId() != gt.ProjectId { - return nil, httperrors.NewForbiddenError("guest template must has same project id with the request") - } - */ + gt := model.(*SGuestTemplate) + //scope := rbacutils.String2Scope(gt.PublicScope) + //if !gt.IsPublic || scope != rbacutils.ScopeSystem { + // return nil, httperrors.NewForbiddenError("guest template must be public in scope system") + //} + if userCred.GetProjectId() != gt.ProjectId { + return nil, httperrors.NewForbiddenError("guest template must has same project id with the request") + } + */ data := input.JSON(input) data.Remove("guest_template")