hackforwesternmass / foodfinder

Food Bank of Western Mass food Finder
4 stars 0 forks source link

Lock down /admin/agencies with Devise #12

Closed asoules closed 10 years ago

coreycondardo commented 10 years ago

I've done the barebones Devise implementation. I've added a horrible Log Out link on the admin page, but we should probably have some kind of easy to use front-end admin menu. I'll leave that up to you guys to decide though :).

We will need to setup permissions so that not anyone is an admin, but right now if you sign up (/users/sign_up) you will have access to /admin/agencies. If you are not logged in, it will prompt you.

Link for implenting admin role for later: https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-Role

patrickbrown-dev commented 10 years ago

For me to close this issue we really should have admin roles implemented. Just "admin" and "user" would be fine.

coreycondardo commented 10 years ago

Updated the branch with admin functionality. The admin page will redirect to home if the user isn't an admin.