dot/.local/share/gnome-shell/extensions/cpupower@mko-sl.de/data/10-mko.cpupower.setcpufreq....

13 lines
368 B
Plaintext
Raw Normal View History

2020-05-11 09:16:27 +00:00
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 === "mko.cpupower.setcpufreq") {
if (subject.user === username) {
return polkit.Result.YES;
} else {
return polkit.Result.NO;
}
}
});