summaryrefslogtreecommitdiff
path: root/test/data/etc/polkit-1/rules.d/10-testing.rules
blob: adf4f169d1a17c7a003340d8eed3686cc59ac090 (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
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */

polkit.addAdministratorRule(function(action, subject) {
    return ["unix-group:admin", "unix-user:root"];
});

polkit.addAdministratorRule(function(action, subject) {
    if (action == "net.company.action1") {
        return ["unix-group:admin"];
    }
    return null;
});

polkit.addAdministratorRule(function(action, subject) {
    if (action == "net.company.action2") {
        return ["unix-group:users"];
    }
    return null;
});

// -----

polkit.addAuthorizationRule(function(action, subject) {
    return "auth_admin";
});

polkit.addAuthorizationRule(function(action, subject) {
    if (action == "org.freedesktop.policykit.exec") {
        return "auth_admin";
    }
    return null;
});