Refactor and centralize permission checking logic
Add meta perms for mobile apps
Merge pull request #1500 from steventlamb/topic/mobile_perms

Topic/mobile perms