polkit: Add some examples

This commit is contained in:
Eelco Dolstra 2013-11-18 18:01:07 +01:00
parent 7ea47df0a4
commit bc56bb7546

View File

@ -23,7 +23,15 @@ in
default = ""; default = "";
example = example =
'' ''
TODO /* Log authorization checks. */
polkit.addRule(function(action, subject) {
polkit.log("user " + subject.user + " is attempting action " + action.id + " from PID " + subject.pid);
});
/* Allow any local user to do anything (dangerous!). */
polkit.addRule(function(action, subject) {
if (subject.local) return "yes";
});
''; '';
description = description =
'' ''