opened
razorcd
username_0
https://osraav.atlassian.net/browse/OSRA-405

- added Rails Login/Logout functionality using devise gem
- changed devise messages from using `Sign in`/`Sign out` to use `Log in`/`Log out`
- removed AA login functionality (had to)
- replaced HQ cucumber features with rspec features
- added login/logout route specs
- small cosmetic css changes
Osra405 hq admin user authentication
issue
created
razorcd
username_0
![loginhqform](https://cloud.githubusercontent.com/assets/3721810/7293552/85869706-e9ae-11e4-954a-8ffb0615b5b8.jpg)

![loginhqform2](https://cloud.githubusercontent.com/assets/3721810/7293561/9c4a8eac-e9ae-11e4-92d3-7bb238f6fba4.jpg)

![loginhqform3](https://cloud.githubusercontent.com/assets/3721810/7293562/9eb86c9a-e9ae-11e4-948d-ae1558012b52.jpg)

![loginhqform4](https://cloud.githubusercontent.com/assets/3721810/7293563/a2cc4dc4-e9ae-11e4-8c4e-12500762cb0e.jpg)
comment
created
razorcd
username_0
By default it will load the hq login form. (AA login form/routes removed) But once logged in, it will redirect to AA dashboard.
comment
created
razorcd
username_0
Notice: because we are not showing the left navbar, the `success` flash message: `Logged out successfully.` is a little off. 
An easy fix would be to just move the flash message just between the header and navbar and remove the border and margin, so it looks more like in AA:

![aa](https://cloud.githubusercontent.com/assets/3721810/7293665/91009b80-e9af-11e4-9469-668578ee9c03.jpg)
comment
created
gmunumel
username_1
Looks great :+1:
comment
created
razorcd
username_0
Hq::Devise and Admin::Devise now run in parallel.   ActiveAdmin functionality is not affected.
comment
created
gmunumel
username_1
:shipit:
comment
created
razorcd
username_0
UPDATE: rspec Feature tests have helper modules for the shared methods.
comment
created
razorcd
username_0
The only inconvenient for this authorization in rails is that you need to log in in `/admin ` to access the active admin pages and the log in in `/hq` to access the hq pages.
AA and Rails should run in parallel so I think we should keep this behavior.
comment
created
robbiejackson
username_2
Christian just checking up with you regarding the folder structure. For the controllers you've got devise under app/controllers/hq as app/controllers/hq/devise 
but for the views you've app/views/devise with hq in the middle between views and devise. Is this what you think is best?
comment
created
razorcd
username_0
@username_2 yes, you are right. I moved `app/views/devise` to `app/views/hq/devise`

Thanks. Good find!
comment