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

[14.0][ADD] impersonate_login #637

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from

Conversation

Kev-Roche
Copy link
Contributor

This module allows to login as another user, its purpose is mainly (only?) for testing and the support team.
As an alternative to auth_admin_passkey, for a more French/European data security complience.

No tests wrote in this module yet, any hints / help will be appreciated.
After adding tests, I will migrate the module in v16.

impersonate_login/models/model.py Outdated Show resolved Hide resolved
@CasVissers-360ERP
Copy link

@Kev-Roche Did you already forward port this to v16/v17?

comodel_name="res.partner",
string="Impersonated Author",
compute="_compute_impersonated_author_id",
store=True,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will take forever to compute in active databases.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just ALTER TABLE mail_message ADD COLUMN impersonated_author_id INTEGER;

@CasVissers-360ERP
Copy link

@Kev-Roche We are working on a v17 port. Like the module.

@Kev-Roche
Copy link
Contributor Author

@Kev-Roche We are working on a v17 port. Like the module.

Hi @CasVissers-360ERP , thanks for your interest. I did not work on other versions yet because tests are missing and I m not sure if the module is working properly.

@CasVissers-360ERP
Copy link

Well the module will make our lives a lot easier. I will ask more team members to review.

request.session.session_token = security.compute_session_token(
request.session, request.env
)
return {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we go to a user without access to the current URL we get an access error, might be better to redirect to main menu?

@astirpe
Copy link
Member

astirpe commented Aug 23, 2024

@Kev-Roche
Thank you for this module! I'm porting it to V17 with a few changes here: #680

Please feel free to include some of the changes I did there, for example the revised def _create() and def write() that I changed a bit to increase efficiency and robustness

@Kev-Roche Kev-Roche force-pushed the 14.0-add-impersonate_login branch 7 times, most recently from 6218882 to 9c45742 Compare September 1, 2024 14:06
@Kev-Roche
Copy link
Contributor Author

@CasVissers-360ERP , @astirpe thank you both for your time and help on this module, I bring some of your changes from V16/17 here.

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

Successfully merging this pull request may close these issues.

5 participants