Changeset 7dde669
- 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)
- Location:
- asadb
- Files:
-
- 2 edited
-
groups/views.py (modified) (3 diffs)
-
template/groups/create/startup_review.html (modified) (1 diff)
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'] = "" -
asadb/template/groups/create/startup_review.html
r172255b r7dde669 51 51 {% endif %} 52 52 53 {% if warnings %} 54 <div class='messagebox warnbox'> 55 <h3>Potential issues</h3> 56 57 <p>The following potential issues were identified with this group's startup application:</p> 58 59 <ul> 60 {% for warning in warnings %} 61 <li>{{warning}}</li> 62 {%endfor%} 63 </ul> 64 65 <p>Please look over these issues. Usually, you should <strong>reach out to the group</strong> and ask them to fix (or consider fixing) each issue before you approve the group. In some cases, it may be appropriate to ignore an issue. (For example, "MIT" is a central part of some group's acronyms (like "HTGAMIT"). In these cases, confirming with the group may not be necessary.)</p> 66 </div> 67 {%endif%} 68 53 69 {% if disp_form %} 54 70 <form enctype="multipart/form-data" method="post" action=""> 55 71 {% csrf_token %} 72 {% if warnings %} 73 <input type='submit' name='approve' value='Approve DESPITE WARNINGS' /> 74 {% else %} 56 75 <input type='submit' name='approve' value='Approve' /> 76 {% endif %} 57 77 <input type='submit' name='reject' value='Reject' /> 58 78 </form>
Note: See TracChangeset
for help on using the changeset viewer.