#3783 (users.UserRoles doesn't show the SiteStaff role)

by Luc Saffre · in Developers · assigned to Luc Saffre

Résumé

Concepts sous-jacents

Commentaires

  • 6 ans, 1 mois ago by Luc Saffre about #3783 (users.UserRoles doesn't show the SiteStaff role) : A side effect of this ticket: lino.utils.diag.Analyzer.get_complexity_factors() no longer yields the number of user_roles. Because I realized that this number is meaningless for discussing the commercial complexity of an application.
  • 6 ans, 1 mois ago by Luc Saffre about #3783 (users.UserRoles doesn't show the SiteStaff role) : This change caused 8 doctests in the book to fail, because xl.SiteAdmin and xl.SiteUser are now reported as well. And that makes sense (as far as i can see at the moment)..
  • 6 ans, 1 mois ago by Luc Saffre about #3783 (users.UserRoles doesn't show the SiteStaff role) : Summary of changes: the UserRoles table didn't show exactly the roles that make sense in step4 of the LETS tutorial. I optimized the selection algorithm for deciding which roles should get reported. The basic rule is simple: those that are mentioned in the global context of the user_types_module. I ...
  • 6 ans, 1 mois ago by Luc Saffre about #3783 (users.UserRoles doesn't show the SiteStaff role) : I almost got it right... but: PrivateCommentsReader is used in Noi, but it doesn't occur in any actor's required_roles (it's tested only dynamically from code), so my new algorithm doesn't show it for Noi. Grr.
  • 6 ans, 1 mois ago by Luc Saffre about #3783 (users.UserRoles doesn't show the SiteStaff role) : the Site.user_roles list was deliberately ignoring all roles defined in the user_types_module: if v.__module__ != site.user_types_module I don't remember why I added this filter condition and therefore removed it.