summaryrefslogtreecommitdiff
path: root/source/l/polkit/20-plugdev-group-mount-override.rules
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/polkit/20-plugdev-group-mount-override.rules')
-rw-r--r--source/l/polkit/20-plugdev-group-mount-override.rules16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/l/polkit/20-plugdev-group-mount-override.rules b/source/l/polkit/20-plugdev-group-mount-override.rules
new file mode 100644
index 00000000..c47a66cf
--- /dev/null
+++ b/source/l/polkit/20-plugdev-group-mount-override.rules
@@ -0,0 +1,16 @@
+/* http://udisks.freedesktop.org/docs/latest/udisks-polkit-actions.html */
+
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.udisks2.filesystem-mount" &&
+ subject.isInGroup("plugdev")) {
+ return polkit.Result.YES;
+ }
+});
+
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.udisks2.eject-media" &&
+ subject.isInGroup("plugdev")) {
+ return polkit.Result.YES;
+ }
+});
+