Changeset 7dde669 for asadb/groups
- Timestamp:
- Nov 30, 2013, 9:51:49 PM (12 years ago)
- Branches:
- master, stable, stage
- Children:
- aed3e6d
- Parents:
- 00ec3e4
- git-author:
- Alex Dehnert <adehnert@…> (11/30/13 16:36:14)
- git-committer:
- Alex Dehnert <adehnert@…> (11/30/13 21:51:49)
- File:
-
- 1 edited
-
asadb/groups/views.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/views.py
r89165c1 r7dde669 696 696 from_email='asa-admin@mit.edu', 697 697 ) 698 # XXX: Handle this better699 if officer_domain != 'mit.edu' or (create_group_list and group_domain != 'mit.edu'):700 accounts_mail.to = ['asa-groups@mit.edu']701 accounts_mail.cc = ['asa-db@mit.edu']702 accounts_mail.subject = "ERROR: " + accounts_mail.subject703 accounts_mail.body = "Bad domain on officer or group list\n\n" + accounts_mail.body704 698 705 699 else: … … 828 822 return render_to_response('groups/create/startup.html', context, context_instance=RequestContext(request), ) 829 823 824 def review_group_check_warnings(group_startup, group, ): 825 warnings = [] 826 827 if group.name.startswith("MIT "): 828 warnings.append('Group name starts with "MIT". Generally, we prefer "Foo, MIT" instead.') 829 if "mit" in group.athena_locker.lower(): 830 warnings.append('Athena locker name contains "mit", which may be redundant with paths like "http://web.mit.edu/mitfoo" or "/mit/foo/".') 831 832 if group_startup.president_kerberos == group_startup.treasurer_kerberos: 833 warnings.append('President matches Treasurer.') 834 if "%s@mit.edu" % (group_startup.president_kerberos, ) in (group.officer_email, group.group_email): 835 warnings.append('President email matches officer and/or group email.') 836 if group.officer_email == group.group_email: 837 warnings.append('Officer email matches group email.') 838 839 if '@mit.edu' not in group.officer_email or '@mit.edu' not in group.group_email: 840 warnings.append('Officer and/or group email are non-MIT. Ensure that they are not requesting the addresses be created, and consider suggesting they use an MIT list instead.') 841 842 if '.' in group.athena_locker: 843 warnings.append('Athena locker contains a ".". This is not compatible with scripts.mit.edu\'s wildcard certificate, and may cause other problems.') 844 if '_' in group.athena_locker: 845 warnings.append('Athena locker contains a "_". If this locker name gets used in a URL (for example, locker.scripts.mit.edu), it will technically violate the hostname specification and may not work in some clients.') 846 if len(group.athena_locker) > 12: 847 warnings.append('Athena locker is more than twelve characters long. In general, twelve characters is the longest Athena locker an ASA-recognized group can get.') 848 849 return warnings 850 830 851 @permission_required('groups.recognize_group') 831 852 def recognize_normal_group(request, pk, ): … … 843 864 if group_startup.stage != groups.models.GROUP_STARTUP_STAGE_SUBMITTED: 844 865 return render_to_response('groups/create/err.not-applying.html', context, context_instance=RequestContext(request), ) 866 867 context['warnings'] = review_group_check_warnings(group_startup, group) 845 868 846 869 context['msg'] = ""
Note: See TracChangeset
for help on using the changeset viewer.