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

can't switch user in multi-threaded access #6

Closed
rvalyi opened this issue Nov 8, 2009 · 3 comments
Closed

can't switch user in multi-threaded access #6

rvalyi opened this issue Nov 8, 2009 · 3 comments

Comments

@rvalyi
Copy link
Member

rvalyi commented Nov 8, 2009

No description provided.

@rvalyi
Copy link
Member Author

rvalyi commented Nov 8, 2009

The users credential might be initialized by Ooor, but utimately they should be carried by the business object ActiveResource proxies. Imagine you code a Rails application, several users are loading instance of same ActiveResource class with different credentials...

@rvalyi
Copy link
Member Author

rvalyi commented Nov 9, 2009

notice that for now you can already globally swicth users using
Ooor.global_login(username, password)

In the future, I'm in favor of allowing to pass credentials right into the context argument.
Once in OOOR, those credentials will be extracted from the context and eventually override global credentials. We could do the same to deal with session context.
see openerp/tools/rpc.py as an exampl in the Python official OpenERP web client.

@rvalyi
Copy link
Member Author

rvalyi commented Jun 6, 2010

fixed by commit http://github.com/rvalyi/ooor/commit/ad02f8cb59139cfe744e9d2fede3c3f17927b4c2
Object should be instanciated with a specific context including user_id and password keys.

This issue was closed.
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

1 participant