99-parabola.rules 704 B

12345678910111213141516171819202122
  1. polkit.addRule(function(action, subject) {
  2. if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
  3. return polkit.Result.YES;
  4. }
  5. });
  6. polkit.addRule(function(action, subject) {
  7. if (action.id == "org.freedesktop.login1.power-off" ||
  8. action.id == "org.freedesktop.login1.reboot" ||
  9. action.id == "org.freedesktop.login1.hibernate" ||
  10. action.id == "org.freedesktop.login1.suspend") {
  11. return polkit.Result.YES;
  12. }
  13. });
  14. polkit.addRule(function(action, subject) {
  15. if (action.id == "org.freedesktop.upower.hibernate" ||
  16. action.id == "org.freedesktop.upower.suspend") {
  17. return polkit.Result.YES;
  18. }
  19. });