summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-05-22 18:59:55 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-06-04 10:45:08 +0200
commit888797ffac2c26e21129447ddc1d46167d36fc74 (patch)
tree1e5ca17e69b464328924b10e72610bfa5abd5b2c /install
parentea5ae4b1cf1aa912ca4b88a7f2dbb59594b28cdb (diff)
downloadfreeipa-888797ffac2c26e21129447ddc1d46167d36fc74.tar.gz
freeipa-888797ffac2c26e21129447ddc1d46167d36fc74.tar.xz
freeipa-888797ffac2c26e21129447ddc1d46167d36fc74.zip
Action panel for user
This patch adds action panel to user account section. The panel contain an action for reseting user password. https://fedorahosted.org/freeipa/ticket/2248
Diffstat (limited to 'install')
-rw-r--r--install/ui/user.js30
1 files changed, 29 insertions, 1 deletions
diff --git a/install/ui/user.js b/install/ui/user.js
index 61db5315e..24d3ba499 100644
--- a/install/ui/user.js
+++ b/install/ui/user.js
@@ -103,6 +103,12 @@ IPA.user.entity = function(spec) {
},
{
name: 'account',
+ action_panel: {
+ factory: IPA.action_panel,
+ name: 'account_actions',
+ label: 'Actions', //TODO: translate
+ actions: ['reset_password']
+ },
fields: [
'uid',
{
@@ -224,7 +230,8 @@ IPA.user.entity = function(spec) {
IPA.select_action,
IPA.enable_action,
IPA.disable_action,
- IPA.delete_action
+ IPA.delete_action,
+ IPA.user.reset_password_action
],
header_actions: ['select_action', 'enable', 'disable', 'delete'],
state: {
@@ -602,4 +609,25 @@ IPA.user_password_dialog = function(spec) {
return that;
};
+IPA.user.reset_password_action = function(spec) {
+
+ spec = spec || {};
+ spec.name = spec.name || 'reset_password';
+ spec.label = spec.label || IPA.messages.password.reset_password;
+ //TODO: add enable condition based on ACL
+
+ var that = IPA.action(spec);
+
+ that.execute_action = function(facet) {
+
+ var dialog = IPA.user_password_dialog({
+ entity: facet.entity
+ });
+
+ dialog.open();
+ };
+
+ return that;
+};
+
IPA.register('user', IPA.user.entity); \ No newline at end of file