From dc0ea34476039b3381daa6f3c031e0e883ceb603 Mon Sep 17 00:00:00 2001 From: Tomokazu Tantaka Date: Tue, 14 Jan 2025 14:12:17 +0900 Subject: [PATCH] check permit --- server/internal/usecase/interactor/nlslayer.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/internal/usecase/interactor/nlslayer.go b/server/internal/usecase/interactor/nlslayer.go index d1da520f41..42a77c7c70 100644 --- a/server/internal/usecase/interactor/nlslayer.go +++ b/server/internal/usecase/interactor/nlslayer.go @@ -653,6 +653,9 @@ func (i *NLSLayer) AddOrUpdateCustomProperties(ctx context.Context, inp interfac if err != nil { return nil, err } + if err := i.CanWriteScene(layer.Scene(), operator); err != nil { + return nil, interfaces.ErrOperationDenied + } if layer.Sketch() == nil { featureCollection := nlslayer.NewFeatureCollection( @@ -701,6 +704,10 @@ func (i *NLSLayer) ChangeCustomPropertyTitle(ctx context.Context, inp interfaces if err != nil { return nil, err } + if err := i.CanWriteScene(layer.Scene(), operator); err != nil { + return nil, interfaces.ErrOperationDenied + } + if layer.Sketch() == nil || layer.Sketch().FeatureCollection() == nil { return nil, interfaces.ErrSketchNotFound }