Skip to content

Commit 33f009b

Browse files
committed
more ugly debug code
1 parent f346da9 commit 33f009b

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

OpenFlow/src/DatabaseConnection.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,18 @@ export class DatabaseConnection {
194194
if (collectionname != "audit") { this._logger.debug("adding " + (item.name || item._name) + " to database"); }
195195

196196
item = this.encryptentity<T>(item);
197+
console.log("_acl after encrypt: " + item._acl.length);
197198
if (!item._id) { item._id = new ObjectID().toHexString(); }
198199

199200
if (collectionname === "users" && item._type === "user" && item.hasOwnProperty("newpassword")) {
200201
(item as any).passwordhash = await Crypt.hash((item as any).newpassword);
201202
delete (item as any).newpassword;
202203
}
203204

205+
console.log("_acl before insert: " + item._acl.length);
204206
var result: InsertOneWriteOpResult = await this.db.collection(collectionname).insertOne(item);
205207
item = result.ops[0];
208+
console.log("_acl after insert: " + item._acl.length);
206209

207210
if (collectionname === "users" && item._type === "user") {
208211
var users: Role = await Role.FindByNameOrId("users", jwt);

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.88
1+
0.0.89

0 commit comments

Comments
 (0)