On 24.6.2014 17:44, Petr Vobornik wrote:
Call user-unlock command from Web UI.
It will unlock displayed user on current master.
related to:
https://fedorahosted.org/freeipa/ticket/2792
This effort has a new ticket: https://fedorahosted.org/freeipa/ticket/4407
Updated patch attached.
--
Petr Vobornik
From 4af1e490b6e6de1049ac720c68a186c63b1a2a97 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <[email protected]>
Date: Tue, 24 Jun 2014 12:24:23 +0200
Subject: [PATCH] webui: support unlock user command
Call user-unlock command from Web UI.
It will unlock displayed user on current master.
https://fedorahosted.org/freeipa/ticket/4407
---
install/ui/src/freeipa/user.js | 10 +++++++++-
install/ui/test/data/ipa_init.json | 4 +++-
ipalib/plugins/internal.py | 2 ++
ipatests/test_webui/test_user.py | 2 ++
4 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js
index 73298093bd7a606cd9ee631056b7135880827d77..337405050d14436f3c0526bb2970b471935fffd4 100644
--- a/install/ui/src/freeipa/user.js
+++ b/install/ui/src/freeipa/user.js
@@ -270,12 +270,20 @@ return {
'delete',
'reset_password',
{
+ $factory: IPA.object_action,
+ name: 'unlock',
+ method: 'unlock',
+ label: '@i18n:objects.user.unlock',
+ needs_confirm: true,
+ confirm_msg: '@i18n:objects.user.unlock_confirm'
+ },
+ {
$type: 'automember_rebuild',
name: 'automember_rebuild',
label: '@i18n:actions.automember_rebuild'
}
],
- header_actions: ['reset_password', 'enable', 'disable', 'delete', 'automember_rebuild'],
+ header_actions: ['reset_password', 'enable', 'disable', 'delete', 'unlock', 'automember_rebuild'],
state: {
evaluators: [
{
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 0c32395ee7d68440aea0271359b0ac88fed86c42..acede3ff2332c1595985b9925ce1e415707b3d2c 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -499,7 +499,9 @@
"mailing": "Mailing Address",
"misc": "Misc. Information",
"status_confirmation": "Are you sure you want to ${action} the user?<br/>The change will take effect immediately.",
- "status_link": "Click to ${action}"
+ "status_link": "Click to ${action}",
+ "unlock": "Unlock",
+ "unlock_confirm": "Are you sure you want to unlock user ${object}?"
}
},
"password": {
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index f9ae831dc665b1282ded798023856dacec480e3b..be555607bfa984e39cb7086ce081ef23e724090e 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -645,6 +645,8 @@ class i18n_messages(Command):
"misc": _("Misc. Information"),
"status_confirmation": _("Are you sure you want to ${action} the user?<br/>The change will take effect immediately."),
"status_link": _("Click to ${action}"),
+ "unlock": _("Unlock"),
+ "unlock_confirm": _("Are you sure you want to unlock user ${object}?"),
},
},
"password": {
diff --git a/ipatests/test_webui/test_user.py b/ipatests/test_webui/test_user.py
index 4c189db89accd7fc0ac242007bbc2fde0ade89d2..d7087b906cd2511daa80d89648d01decd038e964 100644
--- a/ipatests/test_webui/test_user.py
+++ b/ipatests/test_webui/test_user.py
@@ -156,6 +156,8 @@ class test_user(UI_driver):
self.reset_password_action(pwd)
self.assert_text_field('has_password', '******')
+ self.action_list_action('unlock')
+
# delete
self.delete_action(user.ENTITY, user.PKEY)
--
1.9.0
_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel