Updated permissions
This commit is contained in:
parent
05948d31c2
commit
a0638fdff3
1 changed files with 12 additions and 7 deletions
|
|
@ -80,13 +80,18 @@ in {
|
|||
home = "/home/${userGroup}";
|
||||
};
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "${userGroup}.service" &&
|
||||
subject.user == "${userGroup}") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
polkit.addRule(function(action, subject) {
|
||||
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" &&
|
||||
subject.user == "${userGroup}") {
|
||||
polkit.log("ALLOWING access for " + subject.user);
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
subject.user == "${userGroup}" &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue