working commit

This commit is contained in:
2026-03-17 14:56:35 +02:00
parent 97904e0529
commit 52789ef4d1
26 changed files with 1334 additions and 52 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ func (hand *Handler) ValidatePassword(ctx context.Context, username, password st
func (hand *Handler) CheckRight(ctx context.Context, accountID, reqRight, subject string) (bool, error) {
var err error
var res bool
hand.logg.Debugf("Check right %s: right=%s subj=%s", accountID, reqRight, subject)
hand.logg.Debugf("Check right %s: right=[%s] subj=[%s]", accountID, reqRight, subject)
exists, grants, err := hand.mdb.ListGrantsByAccoundIDRight(ctx, accountID, reqRight)
if err != nil {
return res, err
@@ -117,7 +117,7 @@ func (hand *Handler) CheckRight(ctx context.Context, accountID, reqRight, subjec
switch reqRight {
case terms.RightReadFiles, terms.RightWriteFiles, terms.RightReadImages, terms.RightWriteImages:
for _, grant := range grants {
hand.logg.Debugf("Grant pattern=[%s], subject=[%s]", grant.Pattern, subject)
//hand.logg.Debugf("Grant accountID=[%s] pattern=[%s], subject=[%s]", accountID, grant.Pattern, subject)
re, err := regexp.Compile(grant.Pattern)
if err != nil {