summarylogtreecommitdiffstats
path: root/is-udisks2.rules
blob: dd209d38e7af6854b1c1d6c1b6e56d6f0dcefbc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
polkit.addRule(function(action, subject) {
  var YES = polkit.Result.YES;
  var permission = {
    // only required for udisks2:
    "org.freedesktop.udisks2.ata-check-power": YES,
    "org.freedesktop.udisks2.ata-smart-update": YES,
  };
  if (subject.isInGroup("users")) {
    return permission[action.id];
  }
});