ng-admin-demo icon indicating copy to clipboard operation
ng-admin-demo copied to clipboard

ng-admin role-based system

Open akagadovskiy opened this issue 10 years ago • 3 comments
trafficstars

Hi. I've found the tweak for creating ability for role-based access to different parts of functionality in admin. Without any changes in admin-config or ng-admin core repository. Role-based access can be achieved using different configurations for different roles. Naive demo uses simple localStorage without any providers.

if ($window.$get().localStorage.getItem('posters_galore_login') == 'admin') {
//admin config
} else {
//user config
}

akagadovskiy avatar Sep 16 '15 14:09 akagadovskiy

That's not a hack, that's the simple way to handle roles in ng-admin!

fzaninotto avatar Sep 16 '15 14:09 fzaninotto

Unless I'm missing something, this is certainly a hack.

The problem is that you don't know that the user is an admin or not until the app is running at which point ng-admin has already been set up in the controller. So you need to reload the app after log in, and saving the state which is ugly. Same on log out.

drorm avatar Mar 12 '16 04:03 drorm

Can you plz help me to get the input box on my listview

saikiran-sankey-zz avatar Oct 30 '18 11:10 saikiran-sankey-zz