blob: 7f00aa83d0b8a2a8ac4977ee63567d3a3d7be66a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
polkit.addRule(function (action, subject) {
var idx = action.id.lastIndexOf(".");
var username_stripped = action.id.substring(0, idx);
var username = action.id.substring(idx + 1);
if (username_stripped === "{{RULE_BASE}}") {
if (subject.user === username) {
return polkit.Result.YES;
} else {
return polkit.Result.NO;
}
}
});
|