Add permission support (commit probably breaks other apps, be careful