diff options
Diffstat (limited to 'test/data/etc/polkit-1/rules.d/10-testing.rules')
-rw-r--r-- | test/data/etc/polkit-1/rules.d/10-testing.rules | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/data/etc/polkit-1/rules.d/10-testing.rules b/test/data/etc/polkit-1/rules.d/10-testing.rules new file mode 100644 index 0000000..adf4f16 --- /dev/null +++ b/test/data/etc/polkit-1/rules.d/10-testing.rules @@ -0,0 +1,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; +}); |