#6973 (How to handle demo user without user_type)

by Luc Saffre · in Developers · assigned to Luc Saffre

Résumé

This is rather internal and theoretical. On stewards I had created a user "daemon" and then configured ('users', 'demo_username', 'daemon') in their settings. And my daemon user had an empty user_type field. Lino didn't complain, but this was a time bomb: later, when an unrelated background task failed, Should it be allowed to have a get_demo_user() with an empty user_type?

Concepts sous-jacents

Commentaires

  • 2 mois ago by Luc Saffre about #6973 (How to handle demo user without user_type) : My current answer: yes, it should be allowed. It was a bug in TableRow.get_detail_action() to not support it. Exploring this phenomen had a few optimizations as side effect: users.get_demo_user() no longer silently ignores an invalid demo_username. An invoicing.Task now potentially has no author, an...
  • 2 mois ago by Luc Saffre about #6973 (How to handle demo user without user_type) : Created new Ticket #6973 (How to handle demo user without user_type).