akshatpradhan/compliance_chimp — pull request #80 by adamico (2014-04-03 13:41:28+00:00)
Title: Implement global authorization with cancancan

- [x] added the following **User abilities**

- for guest users (not signed in)
- should be able to access Landing Page
- should not be able to access Users list
- should not be able to access Requirements list
- for registered users
- should not be able to access Users List
- should be able to update their own profile
- should be able to access Requirements list
- should be able to create Proofs
- should be able to update their own proofs
- should not be able to update other users' proofs
- for admin users
- should be able to do everything
- should not be able to destroy his own record

- [x] added a global check to ensure authorization is enabled in controllers
- [x] removing unused method `correct_user?` as it is overshadowed by cancancan
- [x] changed "How's it going, username" link to point to `edit_user_path(current_user)`
- [x] unit tests with rspec for user abilities
- [x] capybara spec for the new feature allowing users to edit their profile at any time