diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-03-24 16:55:21 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-03-25 18:32:29 -0400 |
commit | 80363a24af57761c17eb958d354d7ff07d353406 (patch) | |
tree | 5949b79f7db5fd4faf5ad8d64330d1a20947f179 /install/ui/models/user.js | |
parent | 9a9391b572bc09c17bad0735946667df568402d8 (diff) | |
download | freeipa-80363a24af57761c17eb958d354d7ff07d353406.tar.gz freeipa-80363a24af57761c17eb958d354d7ff07d353406.tar.xz freeipa-80363a24af57761c17eb958d354d7ff07d353406.zip |
Prototypemaster
Diffstat (limited to 'install/ui/models/user.js')
-rwxr-xr-x | install/ui/models/user.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/install/ui/models/user.js b/install/ui/models/user.js new file mode 100755 index 00000000..7d934fb1 --- /dev/null +++ b/install/ui/models/user.js @@ -0,0 +1,43 @@ +$.Model.extend('IPA.Models.User', +{ + find: function(args, options, success, error) { + + var command = IPA.command({ + method: 'user_find', + args: args, + options: options, + on_success: function(data, text_status, xhr) { + var users = data.result.result; + success.call(this, users, text_status, xhr); + }, + on_error: error + }); + + command.execute(); + }, + add: function(args, options, success, error) { + + var command = IPA.command({ + method: 'user_add', + args: args, + options: options, + on_success: success, + on_error: error + }); + + command.execute(); + }, + del: function(args, options, success, error) { + + var command = IPA.command({ + method: 'user_del', + args: args, + options: options, + on_success: success, + on_error: error + }); + + command.execute(); + } +}, +{}); |