benjaminapetersen / chore-app

An app for keeping track of stuff for my kids
0 stars 0 forks source link

currentUser #2

Open benjaminapetersen opened 9 years ago

benjaminapetersen commented 9 years ago

Need a currentUser object to control what can and cannot be done...

// roles
currentUser.is('admin')

// one-off permissions, OR permissions via roles
currentUser.can('view:all')
ng-show="currentUser.can('view:all')
$q.all([ user.can('view:all'), tasks.all() ]).then(successFn, failFn) // fail will $location.path() redirect
benjaminapetersen commented 9 years ago

NOTE: