Skip to content
Snippets Groups Projects
  1. Jun 26, 2019
    • Tanner Prestegard's avatar
      Add AuthGroup model · c2b20c67
      Tanner Prestegard authored
      ligoauth.models.AuthGroup is an enhanced version of the builtin Django
      Group model. We add useful attributes like a description, ldap_name,
      and Tag.  These can be used to abstract things that are presently
      handled manually, like inheriting membership from an LDAP group or
      allowing access to view log messages/files with a specific Tag.
      
      I ran some tests comparing this multi-table inheritance setup to
      adding a OneToOneField and loading it with/without select_related.
      After 1K trials, the DB query times looked comparable and didn't
      require multiple queries for this arrangement, so the convenience
      seems to be worth it.
      
      The commit creates the model and populates an instance for existing
      each existing Django Group.
      c2b20c67
Loading