Process permissions after conditional clauses
This commit is contained in:
parent
1c917e7120
commit
beb7862ae8
3 changed files with 6 additions and 6 deletions
|
@ -142,13 +142,13 @@ func (d *document) runDelete(ctx context.Context, stm *sql.DeleteStatement) (int
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
if ok, err = d.allow(ctx, met); err != nil {
|
||||
if ok, err = d.check(ctx, stm.Cond); err != nil {
|
||||
return nil, err
|
||||
} else if ok == false {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if ok, err = d.check(ctx, stm.Cond); err != nil {
|
||||
if ok, err = d.allow(ctx, met); err != nil {
|
||||
return nil, err
|
||||
} else if ok == false {
|
||||
return nil, nil
|
||||
|
|
|
@ -168,13 +168,13 @@ func (d *document) runSelect(ctx context.Context, stm *sql.SelectStatement) (int
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
if ok, err = d.allow(ctx, met); err != nil {
|
||||
if ok, err = d.check(ctx, stm.Cond); err != nil {
|
||||
return nil, err
|
||||
} else if ok == false {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if ok, err = d.check(ctx, stm.Cond); err != nil {
|
||||
if ok, err = d.allow(ctx, met); err != nil {
|
||||
return nil, err
|
||||
} else if ok == false {
|
||||
return nil, nil
|
||||
|
|
|
@ -142,13 +142,13 @@ func (d *document) runUpdate(ctx context.Context, stm *sql.UpdateStatement) (int
|
|||
met = _UPDATE
|
||||
}
|
||||
|
||||
if ok, err = d.allow(ctx, met); err != nil {
|
||||
if ok, err = d.check(ctx, stm.Cond); err != nil {
|
||||
return nil, err
|
||||
} else if ok == false {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if ok, err = d.check(ctx, stm.Cond); err != nil {
|
||||
if ok, err = d.allow(ctx, met); err != nil {
|
||||
return nil, err
|
||||
} else if ok == false {
|
||||
return nil, nil
|
||||
|
|
Loading…
Reference in a new issue