manager: display user deactivation date (#51112)
This commit is contained in:
parent
3b12836e8b
commit
4aa751a710
|
@ -68,6 +68,12 @@
|
|||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if not object.is_active and object.deactivation %}
|
||||
<p class="a2-manager-user-date-deactivated">
|
||||
{% blocktrans with date=object.deactivation %}Deactivated on {{ date }}{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% for data in user_data %}
|
||||
{{ data }}
|
||||
{% endfor %}
|
||||
|
|
|
@ -629,6 +629,20 @@ def test_manager_many_ou_auto_admin_role(app, ou1, admin, user_with_auto_admin_r
|
|||
test_user_listing_auto_admin_role(user_with_auto_admin_role)
|
||||
|
||||
|
||||
def test_manager_deactivate_user(app, admin, settings):
|
||||
default_ou = OU.objects.get()
|
||||
User.objects.create(username='foo', ou=default_ou,
|
||||
first_name='Foo', last_name='Bar')
|
||||
response = login(app, admin, '/manage/users/')
|
||||
response = response.click('Foo Bar')
|
||||
assert 'Deactivated on' not in response.text
|
||||
assert 'Suspend' in response.text
|
||||
form = response.forms['object-actions']
|
||||
response = form.submit('deactivate')
|
||||
assert 'Deactivated on' in response.text
|
||||
assert 'Activate' in response.text
|
||||
|
||||
|
||||
def test_manager_search_user(app, admin, simple_role, settings):
|
||||
default_ou = OU.objects.get()
|
||||
User.objects.create(username='user1', ou=default_ou)
|
||||
|
|
Loading…
Reference in New Issue