-
-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] impersonate_login: Restrict Admin settings impersonation
- Loading branch information
Showing
9 changed files
with
84 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
from . import mail_message | ||
from . import impersonate_log | ||
from . import model | ||
from . import res_config_settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = "res.config.settings" | ||
|
||
restrict_impersonate_admin_settings = fields.Boolean( | ||
string="Restrict Impersonation of 'Administration: Settings' Users", | ||
config_parameter="impersonate_login.restrict_impersonate_admin_settings", | ||
help="If enabled, users with the 'Administration: Settings' access right" | ||
" cannot be impersonated.", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
- Kévin Roche <kevin.roche@akretion.com> | ||
- [360ERP](https://www.360erp.com): | ||
- Andrea Stirpe | ||
- `Ooops404 <https://www.ooops404.com/>`_: | ||
- Eduard Brahas <eduard@ooops404.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<odoo> | ||
<record id="view_res_config_settings_impersonate" model="ir.ui.view"> | ||
<field name="name">res.config.settings.impersonate</field> | ||
<field name="model">res.config.settings</field> | ||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//div[@id='invite_users']" position="after"> | ||
<div id="impersonate_login"> | ||
<h2>Impersonation Login</h2> | ||
<div | ||
class="row mt16 o_settings_container" | ||
name="impersonate_login_settings_container" | ||
> | ||
<div | ||
class="col-12 col-lg-6 o_setting_box" | ||
id="impersonate_login_settings" | ||
> | ||
<div class="o_setting_right_pane"> | ||
<label for="restrict_impersonate_admin_settings"> | ||
Restrict Impersonation Login | ||
</label> | ||
<field | ||
name="restrict_impersonate_admin_settings" | ||
string="Restrict Impersonation of 'Administration: Settings' Users" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |