summaryrefslogtreecommitdiffstats
path: root/install/ui/models/user.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-03-24 16:55:21 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-03-25 18:32:29 -0400
commit80363a24af57761c17eb958d354d7ff07d353406 (patch)
tree5949b79f7db5fd4faf5ad8d64330d1a20947f179 /install/ui/models/user.js
parent9a9391b572bc09c17bad0735946667df568402d8 (diff)
downloadfreeipa-80363a24af57761c17eb958d354d7ff07d353406.tar.gz
freeipa-80363a24af57761c17eb958d354d7ff07d353406.tar.xz
freeipa-80363a24af57761c17eb958d354d7ff07d353406.zip
Prototypemaster
Diffstat (limited to 'install/ui/models/user.js')
-rwxr-xr-xinstall/ui/models/user.js43
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();
+ }
+},
+{});