Revision b27537d5

b/flowspec/views.py
1 1
# Create your views here.
2 2
import urllib2
3
import re
4 3
import socket
5 4
import json
6 5
from django import forms
......
182 181
        mail = request.META['HTTP_SHIB_INETORGPERSON_MAIL']
183 182
        organization = request.META['HTTP_SHIB_HOMEORGANIZATION']
184 183
        affiliation = request.META['HTTP_SHIB_EP_ENTITLEMENT']
185
        match = re.compile(settings.SHIB_AUTH_AFFILIATION)
186
        has_affiliation = match.search(affiliation)
184
        if settings.SHIB_AUTH_AFFILIATION in affiliation.split(";"):
185
            has_affiliation = True
187 186
        if not has_affiliation:
188 187
            error_affiliation = True
189 188
        if not organization:
b/templates/user_routes.html
54 54
			
55 55
		$('#routes_table').dataTable( {
56 56
			"bJQueryUI": true,
57
			"aoColumns": [ 
58
				{"bVisible": false, "bSearchable": false,"bSortable": false },
59
				{"bSearchable": true,"bSortable": true},
60
				{"bSearchable": true,"bSortable": true},
61
				{"bSearchable": true,"bSortable": true},
62
				{"bSearchable": true,"bSortable": true},
63
				{"bSearchable": true,"bSortable": true},
64
				{"bSearchable": true,"bSortable": true},
65
				{"bSearchable": true,"bSortable": true},
66
				{"bVisible": true, "bSearchable": false,"bSortable": false}
67
			],
68
			 "aaSorting": [[0,'desc']],
57 69
			"oLanguage": {
58 70
				"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> rules'
59 71
			},
......
124 136
<table class="display" width="100%" id="routes_table">
125 137
<thead>
126 138
<tr>
139
	<th>Id</th>
127 140
	<th>{% trans "Name" %}</th>
128 141
	<th>{% trans "Match" %}</th>
129 142
	<th style="text-align: center;">{% trans "Then" %}</th>
......
132 145
	<th style="text-align: center;">{% trans "Applier" %}</th>
133 146
	<th style="text-align: center;">{% trans "Expires" %}</th>
134 147
	<th style="text-align: center;">{% trans "Response" %}</th>
135
	<th style="text-align: center; width:140px;">{% trans "Actions" %}</th>
148
	<th style="text-align: center; width:130px;">{% trans "Actions" %}</th>
136 149
</tr>
137 150
</thead>
138 151

  
......
140 153
{% for route in routes %}
141 154

  
142 155
<tr {% ifequal route.status 'ACTIVE' %} class="GradeA" {% else %} class="GradeX" {% endifequal %}>
156
	<td>{{ route.pk }}</td>
143 157
	<td>{{ route.name }}</td>
144 158
	<td>{{ route.get_match|safe|escape }}</td>
145 159
	<td style="text-align: center;">{{route.get_then|safe|escape}}</td>
......
148 162
	<td style="text-align: center;">{{ route.applier }}</td>
149 163
	<td style="text-align: center;">{{ route.expires }}</td>
150 164
	<td style="text-align: center;">{{ route.response }}</td>
151
	<td style="text-align: center;">
165
	<td style="text-align: center; width:140px;">
152 166
		{% ifequal route.status 'ACTIVE' %}
153 167
		<a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">Edit</a> 
154 168
		<button class="del_button" id="{{route.name}}" onclick="javascript:delete_route(this.id)">Del</button>

Also available in: Unified diff