diff options
| author | Stefan Rijnhart <stefan@opener.am> | 2018-10-04 14:29:22 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2018-10-23 14:40:02 +0000 |
| commit | 4d8b0b723b01946b1413383e572628e423a61dac (patch) | |
| tree | 7caf8126c35adc904847bf96d162848767ca2d99 /odoo/__init__.py | |
| parent | 0530b36a2dd5b7463b2b4e2d25e179436135f278 (diff) | |
[FIX] base: don't hardcode the new admin user id
There is no longer a priviledged user and the user named "Administrator" may
not have the id 2.
Instead of hardcoding an id, uses a group-based check
Remove the global variable ADMINUSER_ID to ensure nobody is using it (as it can
be a source of bugs when base.user_admin is not ID 2)
closes odoo/odoo#27432
Diffstat (limited to 'odoo/__init__.py')
| -rw-r--r-- | odoo/__init__.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/odoo/__init__.py b/odoo/__init__.py index 33b072cdd77..f9e2db590f6 100644 --- a/odoo/__init__.py +++ b/odoo/__init__.py @@ -63,7 +63,6 @@ if hasattr(time, 'tzset'): #---------------------------------------------------------- # The hard-coded super-user id (a.k.a. administrator, or root user). SUPERUSER_ID = 1 -ADMINUSER_ID = 2 def registry(database_name=None): |
