File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff line change 1- 0.0.88
1+ 0.0.89
You can’t perform that action at this time.
0 commit comments