summaryrefslogtreecommitdiff
path: root/polkit-1/rules
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2018-11-29 22:15:28 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2018-11-29 22:40:57 +0100
commit0527d1069a879cd9200e56a5f68f86461a019fb7 (patch)
tree1401e98b3e9f0e68f87c29ca65776a41f03ff543 /polkit-1/rules
parent0fe257ed917433231a0ca3b3755c8519c808c03a (diff)
Add policykit configuration to allow setting as user
When the script is installed as /usr/local/bin/brightness, the policykit configuration files allow the user sitting in front of the computer to set the brightness as a non-privileged user. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'polkit-1/rules')
-rw-r--r--polkit-1/rules/90-set-brightness.rules9
1 files changed, 9 insertions, 0 deletions
diff --git a/polkit-1/rules/90-set-brightness.rules b/polkit-1/rules/90-set-brightness.rules
new file mode 100644
index 0000000..f8b158a
--- /dev/null
+++ b/polkit-1/rules/90-set-brightness.rules
@@ -0,0 +1,9 @@
+polkit.addRule(function(action, subject) {
+ if (1
+ && action.id == "com.sigexec.polkit.set-brightness"
+ && subject.seat == "seat0"
+ )
+ {
+ return polkit.Result.YES;
+ }
+});