to be able to safely check the user is allowed to modify the specified portal record. Part-of: odoo/odoo#94020