-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
context.get('currentUser'); is not accessible from User.observe hook #23
Comments
@bajtos any progress? I don't know the details of CLS thing. |
@dehypnosis I think this may be a general problem of the CLS module we use in Could you please try the latest version of this module and check if the problem is still present? See Usage for instructions how to setup your app. |
@dehypnosis @bajtos I was able to get the current user by following the details in Usage as pointed out by Miroslav while trying to reproduce juggler#1250 . If you need any help, please let me know. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
@barocsi commented on Fri Jan 29 2016
I was trying to implement an access filter for my User method depending on the currently logged in user.
However, when I try to access, it is undefined:
It works with other presistedModels operation hooks.
@jannyHou commented on Mon Feb 01 2016
Hi @barocsi thanks for your contribution! And any question or suggestion are welcomed!
I am trying to reproduce the issue with access hook, are you adding it to your custom user model or the build-in User model in loopback?
Could you fork this sandbox and replace it with your code to prove the problem? Thanks!
@barocsi commented on Mon Feb 01 2016
This is a custom user model. I will check against the sandbox repo.
@KaanErkol commented on Thu Mar 31 2016
any solutions ?
@bajtos commented on Tue Jun 07 2016
Possibly related: strongloop/loopback#2397
@jannyHou commented on Tue Jun 07 2016
i am able to reproduce it with the snippet above:
The text was updated successfully, but these errors were encountered: