summaryrefslogtreecommitdiffstats
path: root/install/ui/models/user.js
diff options
context:
space:
mode:
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();
+ }
+},
+{});