aboutsummaryrefslogtreecommitdiffstats
path: root/org.mageia.qarepo-helper.rules
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-02-19 20:42:59 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-02-19 20:45:59 +0000
commit7b78e9f319bdeeee99ec4bc0f01b53ab5673fbd5 (patch)
tree14064243233261625b7476b875fe62025e7c1da7 /org.mageia.qarepo-helper.rules
parentb343a521ed4c460c9cfded35f2c3bc8a3b5f7aa9 (diff)
parentf92b0881239ee80063eb3813a6286a4bb8489fa7 (diff)
downloadqarepo-7b78e9f319bdeeee99ec4bc0f01b53ab5673fbd5.tar
qarepo-7b78e9f319bdeeee99ec4bc0f01b53ab5673fbd5.tar.gz
qarepo-7b78e9f319bdeeee99ec4bc0f01b53ab5673fbd5.tar.bz2
qarepo-7b78e9f319bdeeee99ec4bc0f01b53ab5673fbd5.tar.xz
qarepo-7b78e9f319bdeeee99ec4bc0f01b53ab5673fbd5.zip
Import code from private repository.
Diffstat (limited to 'org.mageia.qarepo-helper.rules')
-rw-r--r--org.mageia.qarepo-helper.rules9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.mageia.qarepo-helper.rules b/org.mageia.qarepo-helper.rules
new file mode 100644
index 0000000..6a9e964
--- /dev/null
+++ b/org.mageia.qarepo-helper.rules
@@ -0,0 +1,9 @@
+polkit.addRule(function(action, subject) {
+ 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;
+ }
+ }
+});