Skip to content
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

runincontext deprecated but whats the replacement? #3078

Closed
barocsi opened this issue Jan 9, 2017 · 3 comments
Closed

runincontext deprecated but whats the replacement? #3078

barocsi opened this issue Jan 9, 2017 · 3 comments

Comments

@barocsi
Copy link

barocsi commented Jan 9, 2017

loopback deprecated loopback.runInContext() is deprecated. See https://docs.strongloop.com/display/APIC/Using%20current%20context for more details.

That URL does not have any details about this command replacement.
According to the docs, currentcontext is discouraged, the linked examples on the docs are pointing to 404
https://github.com/strongloop/loopback/blob/master/example/context/app.js

The linked github ticket is huge, not useful at all.

So how can we access current user or mimic another user?

Right now it is done via currentContext and runInContext.

@bajtos
Copy link
Member

bajtos commented Jan 9, 2017

See #3023.

The documentation update is in progress, see loopbackio/loopback.io#227 (or the markdown file here).

@bajtos bajtos closed this as completed Jan 9, 2017
@bajtos
Copy link
Member

bajtos commented Jan 9, 2017

According to the docs, currentcontext is discouraged, the linked examples on the docs are pointing to 404
https://github.com/strongloop/loopback/blob/master/example/context/app.js

@crandmck could you PTAL at the 404 issue?

@crandmck
Copy link
Contributor

It looks like example/context/app.js was removed at some point. loopbackio/loopback.io#227 removes this link, so it won't be an issue any longer once that PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants