angularjs - AngularFire Route Authentication by user role -


i using firebase's email & password user registration/login system, , security component angularfire-seed repo. lets me add authentication routes so:

.config(function($routeprovider) {      $routeprovider          .whenauthenticated('/profile', {             title: 'profile',             templateurl: '/app/components/profile/profile.html',             controller: 'profilecontroller'         })  }) 

what not require authentication access particular route, require admin access, e.g. '/admin' route, regular authenticated user couldn't see page @ all. explain best way of achieving this?

i thought of adding user profile section firebase, looking when route accessed maybe there's better way. can set firebase security rules can write data, wouldn't stop people accessing page , reading in first place.

i've googled several times , couldn't find related user role authentication angularfire.

thanks help.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -