mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-02 02:48:05 +00:00
small optimization
This commit is contained in:
@@ -109,7 +109,7 @@ func ValidateUserRecordChange(oldRecord []byte, newRecord []byte, authResult str
|
||||
adminRecordChanged := false
|
||||
for _, r := range *result.ExtendedResults {
|
||||
fmt.Printf("path: %s key: %s data: %v\n", r.PropertyPath, r.Key, r.Value)
|
||||
if r.Key == "locked" || (r.Key == "admin" && authResult == "login") {
|
||||
if r.Key == "locked" || (r.Key == "admin" && authResult == "login" && adminRecordChanged == false) {
|
||||
pointer, _ := jptr.Parse(r.PropertyPath)
|
||||
data1, _ := pointer.Eval(oldDoc)
|
||||
data1Binary, _ := json.Marshal(data1)
|
||||
|
||||
Reference in New Issue
Block a user