I hereby claim:
- I am royedc4 on github.
- I am roycalderon (https://keybase.io/roycalderon) on keybase.
- I have a public key whose fingerprint is 9548 6F7F F778 4DFA D532 2EA9 DC34 A66E F784 A80D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // AUTHENTICATION ON ANGULARJS | |
| .run([ | |
| '$rootScope', 'AUTH_EVENTS', 'LoginService', 'logger', '$location' | |
| ($rootScope, AUTH_EVENTS, LoginService, logger, $location) -> | |
| $rootScope.$on '$routeChangeStart', (event,next) -> | |
| authorizedRoles = next.data.authorizedRoles | |
| if !LoginService.isAuthorized(authorizedRoles) | |
| event.preventDefault() | |
| if LoginService.isAuthenticated() | |
| # User is not a11owed |