node.js - How to get the current User inside a 'before save' operation hook? -


loopback.getcurrentcontext() null me. why? need grab current user context. operation hook's ctx not same context , not contain need far can tell.

customer.observe('before save', function checkpermission(ctx, next) {    //do have loopback context works?   var context = loopback.getcurrentcontext();   console.log("context is: " + context);//null! }); 

thanks

this isn't postgresql specific, bug. https://github.com/strongloop/loopback/issues/878#issuecomment-128417677


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -