mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Deny_All pokit rule added
This commit is contained in:
parent
6b249766b5
commit
95f31c3a33
23
gpoa/templates/99-gpoa_disk_permissions.rules.j2
Normal file
23
gpoa/templates/99-gpoa_disk_permissions.rules.j2
Normal file
@ -0,0 +1,23 @@
|
||||
{% if deny_all %}
|
||||
polkit.addAdminRule(function (action, subject) {
|
||||
if (action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat") {
|
||||
return polkit.Result.NO;
|
||||
}
|
||||
return ["unix-group:wheel"];
|
||||
});
|
||||
{% else %}
|
||||
polkit.addAdminRule(function (action, subject) {
|
||||
return ["unix-group:wheel"];
|
||||
});
|
||||
|
||||
polkit.addRule(function (action, subject) {
|
||||
if (action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat" && subject.isInGroup("users")) {
|
||||
polkit.log("Mount action from user: " + subject.user + ", pid: " + subject.id + ": allowed");
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
|
||||
polkit.log("Mount action from user: " + subject.user + ", pid: " + subject.id + ": denied");
|
||||
return polkit.Result.NO;
|
||||
});
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user