Changeset 7b1e3ca for asadb/groups


Ignore:
Timestamp:
Aug 25, 2011, 6:31:05 PM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage, test-hooks
Children:
3275ab1
Parents:
9b4e15e
git-author:
Alex Dehnert <adehnert@…> (08/25/11 18:31:05)
git-committer:
Alex Dehnert <adehnert@…> (08/25/11 18:31:05)
Message:

Limit grant_user to username .*@SYSTEM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/models.py

    r3107c52 r7b1e3ca  
    128128    max_count = models.IntegerField(default=UNLIMITED, help_text='Maximum number of holders of this role. Use %d for no limit.' % UNLIMITED)
    129129    require_student = models.BooleanField(default=False)
    130     grant_user = models.ForeignKey(User, null=True, blank=True, )
     130    grant_user = models.ForeignKey(User, null=True, blank=True,
     131        limit_choices_to={ 'username__endswith': '@SYSTEM'})
    131132    publicly_visible = models.BooleanField(default=True, help_text='Can everyone see the holders of this office.')
    132133
Note: See TracChangeset for help on using the changeset viewer.