[48470131, 48472491] fix two interview bugs

48472491: should stay on the same page after deleting interview on interview list page
48470131: new interview link should not disappear after adding assessment for a candidate on candidate details page

The first bug is a regression caused by changing literal value of Interview_Loop.

Signed-off-by: Henry Chen <hchen@vmware.com>
[48480747] fix crash when deleting job opening with interviewers assigned

We need an 'id' column for join_table so that children can be auto-deleted when deleting parent.
So add an id column for table opening_participant.

As this change is sort of destructive, so merge scheme definition.

Signed-off-by: Henry Chen <hchen@vmware.com>
Merge pull request #112 from Henry-CF/interview

[48470131, 48472491] fix two interview bugs
Merge branch 'master' of https://github.com/vmw-tmpst/heroapp-LetsHire into id_column

Conflicts:
	db/migrate/20130411063008_add_columns_to_opening_and_add_assessment.rb

Signed-off-by: Henry Chen <hchen@vmware.com>
sync with master

Signed-off-by: Henry Chen <hchen@vmware.com>
Merge pull request #113 from Henry-CF/id_column

[48480747] fix crash when deleting opening with interviewers assigned
[46357451] prepare for user.delete function support

Signed-off-by: Henry Chen <hchen@vmware.com>
Merge branch 'master' of https://github.com/vmw-tmpst/heroapp-LetsHire into id_column
Merge pull request #114 from Henry-CF/user_delete

[46357451] prepare for user.delete function support
[PT 48631695] File Storage Implementation Initial Commit
Merge pull request #115 from Chunjie/master

[PT 48631695] File Storage Implementation Initial Commit
hack method to initialize database

Because 'vmc console' is too slow for us to run 'rake db:seed', so add
a route path so we can initialize database via http.

Signed-off-by: Henry Chen <hchen@vmware.com>
Merge branch 'master' of https://github.com/vmw-tmpst/heroapp-LetsHire
Merge pull request #116 from Henry-CF/hack

hack method to initialize database
[46357451] init commit for disabling user

Signed-off-by: Henry Chen <hchen@vmware.com>
[46357451] user deactivation support without breaking the system

Factors need be considered:
1 the disabled user  cannot pass devise authentication
2 For active opening/interviews' edit, the disabled username should not show in the list which is for interviewer/hiringmanager/recruiter's selection.
3 For closed/inactive opening/interviews' edit, the already configured disabled user can still show in the list, and be set back.

4  Now only the admin can disable users, and the admin cannot disable himself/herself.
    In future if the user management privilege is granted to more roles, any user cannot disable himself/herself.
5 cannot disable an user when any of the following cases is true:
  he/she owns active openings as a hiring manager;
  he/she owns active openings as a recruiter;
  he/she owns scheduled/ongoing interview as an interviewer;
6 The admin can easily find the disabled user, and re-activate the account if necessarily.
7 When adding new user, if the email conflicts with any earlier email (even of disabled user), the system should prompt that "Email already exists". This behavior is unchanged.

Signed-off-by: Henry Chen <hchen@vmware.com>
Merge branch 'master' of https://github.com/vmw-tmpst/heroapp-LetsHire into deactivate
[46357451] user deactivation support without breaking the system

more code change

Signed-off-by: Henry Chen <hchen@vmware.com>
[46357451] user deactivation support

add more test cases to cover the check before the deactivation

Signed-off-by: Henry Chen <hchen@vmware.com>
Merge pull request #118 from Henry-CF/deactivate

[46357451] user deactivation support without breaking the system