Add AuthGroup model
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.
Showing
- config/settings/base.py 4 additions, 4 deletionsconfig/settings/base.py
- gracedb/ligoauth/managers.py 15 additions, 0 deletionsgracedb/ligoauth/managers.py
- gracedb/ligoauth/migrations/0037_authgroup.py 28 additions, 0 deletionsgracedb/ligoauth/migrations/0037_authgroup.py
- gracedb/ligoauth/migrations/0038_populate_authgroup.py 156 additions, 0 deletionsgracedb/ligoauth/migrations/0038_populate_authgroup.py
- gracedb/ligoauth/models.py 23 additions, 2 deletionsgracedb/ligoauth/models.py
gracedb/ligoauth/managers.py
0 → 100644
Please register or sign in to comment