Skip to content

Commit

Permalink
polkit: convert legacy rules to new format
Browse files Browse the repository at this point in the history
  • Loading branch information
THS-on committed Jan 6, 2025
1 parent 5bdee09 commit ce41387
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 48 deletions.
6 changes: 0 additions & 6 deletions etc/polkit-1/localauthority/50-local.d/10-datetime.pkla

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions etc/polkit-1/localauthority/50-local.d/10-jbackpack.pkla

This file was deleted.

6 changes: 0 additions & 6 deletions etc/polkit-1/localauthority/50-local.d/10-lshw-gtk.pkla

This file was deleted.

6 changes: 0 additions & 6 deletions etc/polkit-1/localauthority/50-local.d/10-packagekit.pkla

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions etc/polkit-1/localauthority/50-local.d/10-udisks2-mount.pkla

This file was deleted.

7 changes: 7 additions & 0 deletions etc/polkit-1/rules.d/10-datetime.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
polkit.addRule(function(action, subject) {
if (action.id == "org.gnome.controlcenter.datetime.configure" &&
subject.user == "user")
{
return polkit.Result.AUTH_SELF_KEEP;
}
});
7 changes: 7 additions & 0 deletions etc/polkit-1/rules.d/10-gnome-system-log.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
polkit.addRule(function(action, subject) {
if (action.id == "org.debian.pkexec.gnome-system-log.run" &&
subject.user == "user")
{
return polkit.Result.YES;
}
});
7 changes: 7 additions & 0 deletions etc/polkit-1/rules.d/10-jbackpack.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
polkit.addRule(function(action, subject) {
if (action.id == "ch.fhnw.jbackpack" &&
subject.user == "user")
{
return polkit.Result.YES;
}
});
7 changes: 7 additions & 0 deletions etc/polkit-1/rules.d/10-lshw-gtk.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
polkit.addRule(function(action, subject) {
if (action.id == "ch.lernstick.lshw-gtk" &&
subject.user == "*")
{
return polkit.Result.AUTH_SELF;
}
});
7 changes: 7 additions & 0 deletions etc/polkit-1/rules.d/10-packagekit.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
polkit.addRule(function(action, subject) {
if (action.startsWith("org.freedesktop.packagekit.") &&
subject.user == "user")
{
return polkit.Result.YES;
}
});
9 changes: 9 additions & 0 deletions etc/polkit-1/rules.d/10-printer-settings.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
polkit.addRule(function(action, subject) {
if ((action.startsWith("org.opensuse.cupspkhelper.mechanism.") ||
action.id == "com.hp.hp-setup" ||
action.id == "com.hp.hplip.installplugin") &&
subject.user == "user")
{
return polkit.Result.YES;
}
});
7 changes: 7 additions & 0 deletions etc/polkit-1/rules.d/10-udisks2-mount-system.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.udisks2.filesystem-mount-system" &&
subject.user == "user")
{
return polkit.Result.YES;
}
});
7 changes: 7 additions & 0 deletions etc/polkit-1/rules.d/10-udisks2-mount.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.udisks2.filesystem-mount" &&
subject.user == "user")
{
return polkit.Result.YES;
}
});

0 comments on commit ce41387

Please sign in to comment.