aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-14 00:33:12 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-14 00:33:12 +0000
commitc1592abdd07d7db513646c3bf75d1808cad0d638 (patch)
tree19ce9e573313c6983689c4ce8e27289ac823da9b
parent76fc2d1aa07e263e19e38194cb58e3725b41e179 (diff)
downloadqarepo-c1592abdd07d7db513646c3bf75d1808cad0d638.tar
qarepo-c1592abdd07d7db513646c3bf75d1808cad0d638.tar.gz
qarepo-c1592abdd07d7db513646c3bf75d1808cad0d638.tar.bz2
qarepo-c1592abdd07d7db513646c3bf75d1808cad0d638.tar.xz
qarepo-c1592abdd07d7db513646c3bf75d1808cad0d638.zip
Fix bug in polkit rules.
-rw-r--r--org.mageia.qarepo-helper.rules13
1 files changed, 6 insertions, 7 deletions
diff --git a/org.mageia.qarepo-helper.rules b/org.mageia.qarepo-helper.rules
index 8408234..6a9e964 100644
--- a/org.mageia.qarepo-helper.rules
+++ b/org.mageia.qarepo-helper.rules
@@ -1,10 +1,9 @@
polkit.addRule(function(action, subject) {
- if (action.id == "org.mageia.qarepo-helper.pkexec.run" &&
- subject.local && subject.active &&
- subject.isInGroup("qarepo")) {
- return polkit.Result.YES;
- } else {
- return polkit.Result.AUTH_ADMIN_KEEP;
+ if (action.id == "org.mageia.qarepo-helper.pkexec.run") {
+ if (subject.local && subject.active && subject.isInGroup("qarepo")) {
+ return polkit.Result.YES;
+ } else {
+ return polkit.Result.AUTH_ADMIN_KEEP;
+ }
}
});
-