Authorization in AngularJS inspired by Apache Shiro permissions