Updated permissions
This commit is contained in:
parent
05948d31c2
commit
a0638fdff3
1 changed files with 12 additions and 7 deletions
|
|
@ -81,9 +81,14 @@ in {
|
||||||
};
|
};
|
||||||
security.polkit.extraConfig = ''
|
security.polkit.extraConfig = ''
|
||||||
polkit.addRule(function(action, subject) {
|
polkit.addRule(function(action, subject) {
|
||||||
if (action.id == "org.freedesktop.systemd1.manage-units" &&
|
polkit.log("Rule triggered. Action: " + action.id + " Unit: " + action.lookup("unit") + " User: " + subject.user);
|
||||||
|
|
||||||
|
// For journalctl access
|
||||||
|
if ((action.id == "org.freedesktop.systemd1.manage-units" ||
|
||||||
|
action.id == "org.freedesktop.systemd1.unit-journal") &&
|
||||||
action.lookup("unit") == "${userGroup}.service" &&
|
action.lookup("unit") == "${userGroup}.service" &&
|
||||||
subject.user == "${userGroup}") {
|
subject.user == "${userGroup}") {
|
||||||
|
polkit.log("ALLOWING access for " + subject.user);
|
||||||
return polkit.Result.YES;
|
return polkit.Result.YES;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue