summaryrefslogtreecommitdiffstats
path: root/install/ui/models/user.js
blob: 7d934fb151cdfcf223599b138a75957ecbc50400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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();
    }
},
{});