0001-manager-access-context-through-table-object-bis-3122.patch
src/authentic2/manager/locale/fr/LC_MESSAGES/django.po | ||
---|---|---|
593 | 593 |
#, python-format |
594 | 594 |
msgid "" |
595 | 595 |
"Do you really want to remove user "%(username)s" from role "" |
596 |
"%(object)s" ?"
|
|
596 |
"%(role)s" ?"
|
|
597 | 597 |
msgstr "" |
598 |
"Souhaitez-vous vraiment retirer le rôle « %(object)s » à l'utilisateur "
|
|
598 |
"Souhaitez-vous vraiment retirer le rôle « %(role)s » à l'utilisateur "
|
|
599 | 599 |
"« %(username)s » ?" |
600 | 600 | |
601 | 601 |
#: src/authentic2/manager/templates/authentic2/manager/role_permissions.html:19 |
... | ... | |
655 | 655 |
#, python-format |
656 | 656 |
msgid "" |
657 | 657 |
"Do you really want to remove role "%(name)s" from service "" |
658 |
"%(object)s" ?"
|
|
658 |
"%(slug)s" ?"
|
|
659 | 659 |
msgstr "" |
660 | 660 |
"Souhaitez-vous vraiment retirer le rôle « %(name)s » du service " |
661 |
"« %(object)s » ?"
|
|
661 |
"« %(slug)s » ?"
|
|
662 | 662 | |
663 | 663 |
#: src/authentic2/manager/templates/authentic2/manager/site_import.html:5 |
664 | 664 |
msgid "Site Import" |
... | ... | |
867 | 867 |
#, python-format |
868 | 868 |
msgid "" |
869 | 869 |
"Do you really want to remove role "%(name)s" from user "" |
870 |
"%(object)s" ?"
|
|
870 |
"%(username)s" ?"
|
|
871 | 871 |
msgstr "" |
872 | 872 |
"Souhaitez-vous vraiment retirer le rôle « %(name)s » à l'utilisateur " |
873 |
"« %(object)s » ?"
|
|
873 |
"« %(username)s » ?"
|
|
874 | 874 | |
875 | 875 |
#: src/authentic2/manager/templates/authentic2/manager/users.html:13 |
876 | 876 |
#: src/authentic2/manager/templates/authentic2/manager/users.html:20 |
src/authentic2/manager/templates/authentic2/manager/role_members_table.html | ||
---|---|---|
7 | 7 |
<th></th> |
8 | 8 |
{% endblock %} |
9 | 9 |
{% block table.tbody.last.column %} |
10 |
<td>{% if view.can_change and row.record.direct %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with username=row.record.get_full_name role=active_role.name %}Do you really want to remove user "{{ username }}" from role "{{ object }}" ?{% endblocktrans %}" href="#" data-pk-arg="user"></a>{% endif %}</td>
|
|
10 |
<td>{% if table.context.view.can_change and row.record.direct %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with username=row.record.get_full_name role=table.context.object.name %}Do you really want to remove user "{{ username }}" from role "{{ role }}" ?{% endblocktrans %}" href="#" data-pk-arg="user"></a>{% endif %}</td>
|
|
11 | 11 |
{% endblock %} |
12 | 12 |
{% endif %} |
src/authentic2/manager/templates/authentic2/manager/role_permissions_table.html | ||
---|---|---|
7 | 7 |
<th></th> |
8 | 8 |
{% endblock %} |
9 | 9 |
{% block table.tbody.last.column %} |
10 |
<td>{% if view.can_change %}<a class="icon-remove-sign js-remove-object" href="#" data-pk-arg="permission"></a>{% endif %}</td> |
|
10 |
<td>{% if table.context.view.can_change %}<a class="icon-remove-sign js-remove-object" href="#" data-pk-arg="permission"></a>{% endif %}</td>
|
|
11 | 11 |
{% endblock %} |
12 | 12 |
{% endif %} |
src/authentic2/manager/templates/authentic2/manager/service_roles_table.html | ||
---|---|---|
7 | 7 |
<th></th> |
8 | 8 |
{% endblock %} |
9 | 9 |
{% block table.tbody.last.column %} |
10 |
<td>{% if view.can_change %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with name=row.record.name slug=row.record.slug %}Do you really want to remove role "{{ name }}" from service "{{ object }}" ?{% endblocktrans %}" href="#" data-pk-arg="role"></a>{% endif %}</td>
|
|
10 |
<td>{% if table.context.view.can_change %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with name=row.record.name slug=table.context.object %}Do you really want to remove role "{{ name }}" from service "{{ slug }}" ?{% endblocktrans %}" href="#" data-pk-arg="role"></a>{% endif %}</td>
|
|
11 | 11 |
{% endblock %} |
12 | 12 |
{% endif %} |
src/authentic2/manager/templates/authentic2/manager/table.html | ||
---|---|---|
24 | 24 |
{% if popup_edit %} |
25 | 25 |
rel="popup" |
26 | 26 |
{% endif %} |
27 |
{% if url_name %} |
|
28 |
data-url="{% url url_name pk=row.record.pk %}" |
|
27 |
{% if table.context.url_name %}
|
|
28 |
data-url="{% url table.context.url_name pk=row.record.pk %}"
|
|
29 | 29 |
{% else %} |
30 | 30 |
data-url="{{ row.record.pk }}/" |
31 | 31 |
{% endif %} |
src/authentic2/manager/templates/authentic2/manager/user_roles.html | ||
---|---|---|
11 | 11 |
{% block page_title %} |
12 | 12 |
{% trans "Edit User Roles" %} |
13 | 13 |
{% endblock %} |
14 | ||
15 | 14 |
{% block extrascripts %} |
16 | 15 |
{{ block.super }} |
17 | 16 |
<script> |
src/authentic2/manager/templates/authentic2/manager/user_roles_table.html | ||
---|---|---|
7 | 7 |
<th></th> |
8 | 8 |
{% endblock %} |
9 | 9 |
{% block table.tbody.last.column %} |
10 |
<td>{% if view.can_change and row.record.member %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with name=row.record.name role=active_role.name %}Do you really want to remove role "{{ name }}" from user "{{ object }}" ?{% endblocktrans %}" href="#" data-pk-arg="role"></a>{% endif %}</td>
|
|
10 |
<td>{% if table.context.view.can_change and row.record.member %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with name=row.record.name username=table.context.object.get_full_name %}Do you really want to remove role "{{ name }}" from user "{{ username }}" ?{% endblocktrans %}" href="#" data-pk-arg="role"></a>{% endif %}</td>
|
|
11 | 11 |
{% endblock %} |
12 | 12 |
{% endif %} |
tests/test_manager.py | ||
---|---|---|
319 | 319 |
q = response.pyquery.remove_namespaces() |
320 | 320 |
assert len(q('table tbody tr')) == 1 |
321 | 321 |
assert q('table tbody tr').text() == u'simple role' |
322 |
assert q('table tbody tr').attr('data-url') == '/manage/roles/%s/' % simple_role.pk |
|
322 | 323 | |
323 | 324 |
form.set('search-internals', True) |
324 | 325 |
response = form.submit() |
325 |
- |