Skip to content

[REM] applications: warning about deactivating the admin user#18938

Open
mege-odoo wants to merge 1 commit into
17.0from
17.0-rem-archive-main-admin-user-warning
Open

[REM] applications: warning about deactivating the admin user#18938
mege-odoo wants to merge 1 commit into
17.0from
17.0-rem-archive-main-admin-user-warning

Conversation

@mege-odoo

Copy link
Copy Markdown
Contributor

The warning is redundant because Odoo prevents you from archiving the currently logged in user. The only way you'd be able to remove access from a database by archiving an admin user would be to do so for all admin users as the superuser. The superuser section of the access rights page warns against locking yourself out that way:
https://www.odoo.com/documentation/19.0/applications/general/users/access_rights.html#superuser-mode

It also causes confusion, because Odoo has a default admin user with an id defined in the external reference base.user_admin. If code relies on that user being present, it can indeed cause problems when archived. But Odoo should support that use case, and be robust against it. You should be able to archive the default admin user. See the discussion in odoo/odoo#264352 .

If you ask odoo.com/help if you should be able to archive the default admin user, it'll say you should never do that citing this section.

Hence this change removes the section altogether. The main risk for locking yourself out of your database is changing access rights, and the documentation page for that has multiple warnings about it. Unless you are the superuser or use direct SQL, you should not be able to lock all admin users out of the database through archiving in the UI.

The warning is redundant because Odoo prevents you from archiving the
currently logged in user. The only way you'd be able to remove access
from a database by archiving an admin user would be to do so for all
admin users as the superuser. The superuser section of the access rights
page warns against locking yourself out that way:
https://www.odoo.com/documentation/19.0/applications/general/users/access_rights.html#superuser-mode

It also causes confusion, because Odoo has a default admin user with an
id defined in the external reference `base.user_admin`. If code relies
on that user being present, it can indeed cause problems when archived.
But Odoo should support that use case, and be robust against it. You
should be able to archive the default admin user. See the discussion in
odoo/odoo#264352 .

If you ask odoo.com/help if you should be able to archive the default
admin user, it'll say you should never do that citing this section.

Hence this change removes the section altogether. The main risk for
locking yourself out of your database is changing access rights, and the
documentation page for that has multiple warnings about it. Unless you
are the superuser or use direct SQL, you should not be able to lock all
admin users out of the database through archiving in the UI.
@robodoo

robodoo commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Pull request status dashboard

@C3POdoo
C3POdoo requested a review from a team July 15, 2026 13:31
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.

2 participants