working commit

This commit is contained in:
2026-02-14 20:06:12 +02:00
parent 53ed35dc08
commit 62ada20925
6 changed files with 47 additions and 49 deletions
+7
View File
@@ -3,6 +3,7 @@ package operator
import (
"context"
"fmt"
"regexp"
"mstore/app/descr"
"mstore/pkg/auxtool"
@@ -36,6 +37,12 @@ func (oper *Operator) CreateGrant(ctx context.Context, operID string, params *Cr
return res, err
}
_, err = regexp.Compile(params.Pattern)
if err != nil {
err := fmt.Errorf("Cannot compile regexp %s: %v", err)
return res, err
}
grantExists, _, err := oper.mdb.GetGrantByAccoundIDRightPattern(ctx, params.AccountID, params.Right, params.Pattern)
if err != nil {
return res, err