La llave de acceso sale de todas las pantallas
Se revierte la decisión de conservar el bloque de auth_passkey en el inicio de sesión («it is restyled, not dropped»), y se cierran también el resto de las puertas visibles: - Inicio de sesión: replace vacío sobre el `t-call="web.login_oauth"` de web.login, que es quien dibuja el «- o -» y el botón; el bloque no está en el arch de web.login y un xpath sobre él no engancharía. - Alta y restablecer contraseña (y cualquier página que llame a web.login_oauth): fuera las tres líneas con que auth_passkey añade su botón a `auth_btns`; con la lista vacía el t-if del core se lleva el separador. - Ficha del usuario y preferencias: la sección «Llaves de acceso». - Asistente de confirmar identidad: el modo llave y su botón. Además el asistente ya no ARRANCA en ese modo: auth_passkey lo pone por defecto a quien tiene una llave, con la contraseña oculta y la salida dentro del bloque retirado; sin esto abría una hoja en blanco. - Portal /my/security: la tabla de llaves y su «Agregar» (beyond_attendance_qr). Todo con replace vacío y prioridad 99, para correr después de las herencias de auth_passkey sea cual sea el orden de instalación. Por eso beyond_base depende ahora de auth_passkey y beyond_attendance_qr de auth_passkey_portal: los nodos que se quitan son suyos. Solo se esconden las puertas: las llaves registradas NO se borran y los módulos siguen instalados. Devolverlas es quitar los xpaths y el método por defecto; views/passkey_templates.xml los lista. El servidor sigue aceptando un inicio de sesión con llave si alguien lo envía a mano. El SCSS del login pierde las reglas que vestían el bloque, ya huérfanas. Sin pruebas nuevas. Verificado instalando los nueve módulos en una base desechable —todos los xpaths enganchan, sin errores de vista ni de assets— y revisando cada puerta ahí: ningún nodo de llave, y a un usuario con llave registrada el asistente le pide contraseña (la capa de auth_passkey sola pediría la llave). pruebas.sh beyond_base: los mismos 2 rojos que en main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0133b8e339
commit
d9b7be34b1
8 files changed
+125
-85
No files matched your search
@@ -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',
|
||||
|
||||
@@ -383,4 +383,14 @@
|
||||
</body>
|
||||
</html>
|
||||
</template>
|
||||
|
||||
<!-- Sin llave de acceso en /my/security (14-sep-2026). Beyond lleva /my
|
||||
al panel del colaborador, pero la página de seguridad sigue a una URL
|
||||
de distancia y auth_passkey_portal le pone su tabla y su «Agregar».
|
||||
Prioridad 99 para correr después de él; las llaves registradas no se
|
||||
borran. El resto de las puertas: beyond_base/views/passkey_templates.xml. -->
|
||||
<template id="portal_my_security_no_passkey" inherit_id="portal.portal_my_security"
|
||||
priority="99" name="Beyond — seguridad sin llave de acceso">
|
||||
<xpath expr="//section[@name='portal_passkey_management']" position="replace"/>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -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': [
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@@ -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.
|
||||
-->
|
||||
|
||||
<!--
|
||||
@@ -113,7 +119,7 @@
|
||||
<span class="beyond_login_sign">Powered by Collina Systems</span>
|
||||
</xpath>
|
||||
|
||||
<!-- See note 1 at the top of this file. -->
|
||||
<!-- See the web.user_switch note at the top of this file. -->
|
||||
<xpath expr="//owl-component[@name='web.user_switch']" position="replace"/>
|
||||
|
||||
<!-- Core hides the form with `d-none` and lets the user switcher decide
|
||||
@@ -180,8 +186,8 @@
|
||||
<attribute name="class">beyond_login_message</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- oe_login_buttons is kept in the class list: auth_signup and
|
||||
auth_passkey both hang their arch off it. -->
|
||||
<!-- oe_login_buttons is kept in the class list: auth_signup hangs its
|
||||
arch off it. -->
|
||||
<xpath expr="//div[hasclass('oe_login_buttons')]" position="attributes">
|
||||
<attribute name="class">oe_login_buttons beyond_login_actions</attribute>
|
||||
</xpath>
|
||||
@@ -189,7 +195,11 @@
|
||||
<attribute name="class">beyond_login_submit</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- See the third note at the top of this file. -->
|
||||
<!-- See the passkey note at the top of this file. The block is not in
|
||||
web.login's arch: this call renders it, so the call is what goes. -->
|
||||
<xpath expr="//t[@t-call='web.login_oauth']" position="replace"/>
|
||||
|
||||
<!-- See the signup note at the top of this file. -->
|
||||
<xpath expr="//a[contains(@t-attf-href, '/web/signup')]" position="replace"/>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!--
|
||||
Llaves de acceso: ninguna puerta a la vista (14-sep-2026).
|
||||
|
||||
auth_passkey se instala solo (auto_install con base_setup) y, además
|
||||
del inicio de sesión (login_templates.xml), asoma en estos sitios.
|
||||
Todos se retiran igual que allí, con un replace vacío.
|
||||
|
||||
Solo se van las puertas: las llaves ya registradas NO se borran y el
|
||||
módulo sigue instalado. Devolverlas es quitar este archivo, el xpath
|
||||
del login, el del portal (beyond_attendance_qr/views/portal_templates.xml)
|
||||
y el método por defecto de models/res_users_identitycheck.py.
|
||||
|
||||
Prioridad 99 en todas: corren después de las herencias de auth_passkey
|
||||
sea cual sea el orden en que se instaló la base. Por lo mismo
|
||||
beyond_base depende de auth_passkey: los nodos que se quitan son suyos.
|
||||
-->
|
||||
|
||||
<!-- Alta, restablecer contraseña y cualquier otra página que llame a
|
||||
web.login_oauth. auth_passkey añade su botón a `auth_btns` con estas
|
||||
tres líneas; sin ellas la lista queda vacía y el propio t-if del core
|
||||
se lleva el separador «- o -». -->
|
||||
<template id="login_oauth_no_passkey" inherit_id="web.login_oauth" priority="99"
|
||||
name="Beyond — sin llave de acceso">
|
||||
<xpath expr="//t[@t-set='passkey_body']" position="replace"/>
|
||||
<xpath expr="//t[@t-set='passkey_btn']" position="replace"/>
|
||||
<xpath expr="//t[@t-set='auth_btns'][contains(@t-value, 'passkey_btn')]" position="replace"/>
|
||||
</template>
|
||||
|
||||
<!-- La ficha del usuario (la propia) y sus preferencias: la sección
|
||||
«Llaves de acceso» con su «Agregar llave de acceso». -->
|
||||
<record id="view_users_form_no_passkey" model="ir.ui.view">
|
||||
<field name="name">res.users.form.beyond.no.passkey</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[div/div/button[@name='action_create_passkey']]" position="replace"/>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_users_form_simple_modif_no_passkey" model="ir.ui.view">
|
||||
<field name="name">res.users.preferences.beyond.no.passkey</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[div/div/button[@name='action_create_passkey']]" position="replace"/>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Confirmar la identidad (el que abre, p. ej., cerrar sesión en un
|
||||
dispositivo desde Mi perfil). Se quitan el modo llave y su botón; que
|
||||
el asistente no ARRANQUE en ese modo lo pone
|
||||
models/res_users_identitycheck.py. -->
|
||||
<record id="res_users_identitycheck_view_form_no_passkey" model="ir.ui.view">
|
||||
<field name="name">res.users.identitycheck.form.beyond.no.passkey</field>
|
||||
<field name="model">res.users.identitycheck</field>
|
||||
<field name="inherit_id" ref="base.res_users_identitycheck_view_form"/>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet/div[contains(@invisible, 'webauthn')]" position="replace"/>
|
||||
<xpath expr="//footer/button[contains(@invisible, 'webauthn')]" position="replace"/>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in new issue
Block a user