Skip to content

Commit

Permalink
check permit
Browse files Browse the repository at this point in the history
  • Loading branch information
hexaforce committed Jan 14, 2025
1 parent f93dc75 commit dc0ea34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/internal/usecase/interactor/nlslayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit dc0ea34

Please sign in to comment.