diff --git a/addons/beyond_attendance_qr/__manifest__.py b/addons/beyond_attendance_qr/__manifest__.py index d1b22f6..02d0e0d 100644 --- a/addons/beyond_attendance_qr/__manifest__.py +++ b/addons/beyond_attendance_qr/__manifest__.py @@ -20,7 +20,7 @@ calcada del sistema Taboada de Collina: 'category': 'Beyond', 'author': 'Collina Systems', 'license': 'Other proprietary', - 'depends': ['beyond_branch', 'hr_attendance', 'portal'], + 'depends': ['beyond_branch', 'hr_attendance', 'portal', 'auth_passkey_portal'], 'data': [ 'security/beyond_attendance_security.xml', 'security/ir.model.access.csv', diff --git a/addons/beyond_attendance_qr/views/portal_templates.xml b/addons/beyond_attendance_qr/views/portal_templates.xml index dbfef70..b38cb92 100644 --- a/addons/beyond_attendance_qr/views/portal_templates.xml +++ b/addons/beyond_attendance_qr/views/portal_templates.xml @@ -383,4 +383,14 @@ + + + diff --git a/addons/beyond_base/__manifest__.py b/addons/beyond_base/__manifest__.py index a2eb5c3..dfe7b6c 100644 --- a/addons/beyond_base/__manifest__.py +++ b/addons/beyond_base/__manifest__.py @@ -23,7 +23,7 @@ enlace de "¿Olvidaste tu contraseña?" es el suyo, con su condición real. 'category': 'Beyond', 'author': 'Collina Systems', 'license': 'Other proprietary', - 'depends': ['base', 'web', 'auth_signup', 'hr', 'hr_attendance'], + 'depends': ['base', 'web', 'auth_signup', 'auth_passkey', 'hr', 'hr_attendance'], 'data': [ 'security/beyond_security.xml', 'data/branding.xml', @@ -35,6 +35,7 @@ enlace de "¿Olvidaste tu contraseña?" es el suyo, con su condición real. 'data/url_publica.xml', 'data/signup.xml', 'views/login_templates.xml', + 'views/passkey_templates.xml', 'views/webclient_templates.xml', ], 'demo': [ diff --git a/addons/beyond_base/models/__init__.py b/addons/beyond_base/models/__init__.py index 5c8dcef..211876a 100644 --- a/addons/beyond_base/models/__init__.py +++ b/addons/beyond_base/models/__init__.py @@ -5,5 +5,6 @@ from . import ir_cron from . import res_company from . import res_lang from . import res_users +from . import res_users_identitycheck from . import beyond_acentos from . import ir_ui_view diff --git a/addons/beyond_base/models/res_users_identitycheck.py b/addons/beyond_base/models/res_users_identitycheck.py new file mode 100644 index 0000000..4cfabbc --- /dev/null +++ b/addons/beyond_base/models/res_users_identitycheck.py @@ -0,0 +1,19 @@ +# Part of Beyond. Collina Systems proprietary module. +from odoo import api, models + + +class ResUsersIdentitycheck(models.TransientModel): + """Confirmar la identidad nunca arranca en la llave de acceso (14-sep-2026). + + auth_passkey pone 'webauthn' por defecto a quien tiene una llave + registrada, y en ese modo el campo de contraseña se oculta: la única + salida, «Usar contraseña», vivía en el bloque que retira + views/passkey_templates.xml. Sin esto, quien registró una llave abriría + el asistente a una hoja en blanco. + """ + _inherit = 'res.users.identitycheck' + + @api.model + def _get_default_auth_method(self): + metodo = super()._get_default_auth_method() + return 'password' if metodo == 'webauthn' else metodo diff --git a/addons/beyond_base/static/src/login/beyond_login.scss b/addons/beyond_base/static/src/login/beyond_login.scss index d785afd..e0bf168 100644 --- a/addons/beyond_base/static/src/login/beyond_login.scss +++ b/addons/beyond_base/static/src/login/beyond_login.scss @@ -289,13 +289,13 @@ $beyond-login-error: #C55A22; // --------------------------------------------------------------------- // Call to action // --------------------------------------------------------------------- - // ENGINEERING — core wraps the CTA and everything auth_signup/auth_passkey - // bolt onto it in one `oe_login_buttons` div. That div has to survive (it - // is their xpath anchor) but it must not be a box, or its contents cannot - // be interleaved with the server's messages. `display: contents` dissolves - // it: the CTA and the passkey block become items of the form's own column, - // on its 26px rhythm, and `order` below can place the message between them - // — under the CTA, where the design puts it. + // ENGINEERING — core wraps the CTA and everything auth_signup bolts onto + // it in one `oe_login_buttons` div. That div has to survive (it is the + // xpath anchor) but it must not be a box, or its contents cannot be + // interleaved with the server's messages. `display: contents` dissolves + // it: the CTA becomes an item of the form's own column, on its 26px + // rhythm, and `order` below can place the message under it, where the + // design puts it. .beyond_login_actions { display: contents; } @@ -331,8 +331,7 @@ $beyond-login-error: #C55A22; // excluded: they light up through the design's own focus state above. .beyond_login_submit, .beyond_login_eye, - .beyond_login_forgot, - .o_login_auth .list-group-item { + .beyond_login_forgot { &:focus-visible { outline: 3px solid $beyond-login-ink; outline-offset: 3px; @@ -361,12 +360,6 @@ $beyond-login-error: #C55A22; font-weight: 700; } - // ...and the passkey block after it, so the message stays glued to the CTA - // that produced it instead of being pushed below an alternative way in. - .o_login_auth { - order: 2; - } - .beyond_login_error, .o_caps_lock_warning_text { color: $beyond-login-error; @@ -381,67 +374,6 @@ $beyond-login-error: #C55A22; display: block; } - // --------------------------------------------------------------------- - // Passkeys - // - // Not in the design, and kept anyway: auth_passkey is installed and this - // block is a real way into the system. Dropping it would lock out anyone - // who registered a key. Dressed in the field's own clothes instead. - // --------------------------------------------------------------------- - .o_login_auth { - display: flex; - flex-direction: column; - gap: 14px; - - > em { - margin: 0; - font-style: normal; - text-align: center; - font-size: 12px; - font-weight: 600; - letter-spacing: 0.04em; - color: $beyond-ink-muted; - } - - .list-group { - display: flex; - flex-direction: column; - gap: 10px; - } - - .list-group-item { - all: unset; - cursor: pointer; - box-sizing: border-box; - width: 100%; - // ENGINEERING — core builds this link from a dict and hangs - // Bootstrap utilities on it (`py-2`, `d-flex`, `gap-2`), which are - // !important. min-height carries the 48px touch floor without - // joining an !important war; the horizontal padding is ours - // because no utility sets it. - min-height: 56px; - padding-left: 18px; - padding-right: 18px; - display: flex; - align-items: center; - justify-content: center; - gap: 10px; - border-radius: 16px; - background: $beyond-login-field-bg; - border: 1.5px solid $beyond-line; - font-size: 15px; - font-weight: 700; - color: $beyond-ink; - text-align: center; - transition: background 140ms ease, border-color 140ms ease; - - &:hover { - background: $beyond-surface-hover; - border-color: $beyond-ink-softer; - } - } - } - // --------------------------------------------------------------------- // The signature, at the foot // --------------------------------------------------------------------- diff --git a/addons/beyond_base/views/login_templates.xml b/addons/beyond_base/views/login_templates.xml index ed29b80..d456ccd 100644 --- a/addons/beyond_base/views/login_templates.xml +++ b/addons/beyond_base/views/login_templates.xml @@ -45,9 +45,15 @@ themselves up. NOTE this only takes the link off this screen — the /web/signup route stays open until `auth_signup.invitation_scope` is set to b2b in Ajustes. - - The passkey block (auth_passkey) STAYS. It is not in the design, but - it is a real way in, and removing it would lock out anyone who - registered a key. It is restyled, not dropped. + - The passkey block (auth_passkey) is REMOVED (14-sep-2026), reversing + the earlier decision to keep it restyled, and so is every other + passkey door in the system (views/passkey_templates.xml, which lists + them). Only the doors are hidden: keys already registered are NOT + deleted and auth_passkey stays installed, so bringing them back is + putting the xpaths back. Here it is taken out at its + `t-call="web.login_oauth"`, which renders the "- o -" separator and + every button in `auth_btns` — today only the passkey, since + auth_oauth is not installed. --> + + oe_login_buttons beyond_login_actions @@ -189,7 +195,11 @@ beyond_login_submit - + + + + diff --git a/addons/beyond_base/views/passkey_templates.xml b/addons/beyond_base/views/passkey_templates.xml new file mode 100644 index 0000000..5cd871f --- /dev/null +++ b/addons/beyond_base/views/passkey_templates.xml @@ -0,0 +1,67 @@ + + + + + + + + + + res.users.form.beyond.no.passkey + res.users + + 99 + + + + + + + res.users.preferences.beyond.no.passkey + res.users + + 99 + + + + + + + + res.users.identitycheck.form.beyond.no.passkey + res.users.identitycheck + + 99 + + + + + +