Ignore:
Timestamp:
Mar 14, 2013, 5:04:17 AM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
9b22b0f
Parents:
58fe19c
git-author:
Alex Dehnert <adehnert@…> (03/14/13 04:55:16)
git-committer:
Alex Dehnert <adehnert@…> (03/14/13 05:04:17)
Message:

Allow search by account number, officer list

Both had privacy concerns, but I think they're fine:

Account numbers (ASA-#122) can already be looked up, entirely unauthenticated,
with the account lookup tool (https://asa.mit.edu/groups/account_lookup/).
Exposing a search for exact account numbers on the search page too seems
acceptable in this light.

Officer lists (ASA-#123) are mostly public --- they're available to anybody
with certs, they're on most groups' websites, and I believe we'd display them
obfuscated to the whole world if we had obfuscation code. The possibility of
somebody scraping the search page with progressively more refined search terms
to get this data seems acceptable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/views.py

    r4752b74 r7b00af8  
    3131
    3232from util.db_form_utils import StaticWidget
     33import util.db_filters
    3334from util.emails import email_from_template
    3435
     
    900901    name = django_filters.CharFilter(lookup_type='icontains', label="Name contains")
    901902    abbreviation = django_filters.CharFilter(lookup_type='iexact', label="Abbreviation is")
     903    officer_email = django_filters.CharFilter(lookup_type='icontains', label="Officers' list contains")
     904
     905    account_filter = util.db_filters.MultiNumberFilter(
     906        lookup_type='exact', label="Account number",
     907        names=('main_account_id', 'funding_account_id', ),
     908    )
    902909
    903910    class Meta:
     
    906913            'name',
    907914            'abbreviation',
     915            'officer_email',
    908916            'activity_category',
    909917            'group_class',
    910918            'group_status',
    911919            'group_funding',
     920            'account_filter',
    912921        ]
    913922
Note: See TracChangeset for help on using the changeset viewer.