WIP
WIP [ci skip]
Merge branch 'flow-manager-title' of github-tahi:Tahi-project/tahi into flow-manager-title

[ci skip]

Conflicts:
	app/models/role_flow.rb
	app/services/flow_query.rb
role flow seems to be working [ci skip]
remove unused method and change join to includes
Merge remote-tracking branch 'origin/master' into flow-manager-title

Conflicts:
	db/schema.rb
It's not necessary to do this
Default associations are not needed
Properly associate user_flow to role_flow
appease the hound
add papers#index route to serve ?doi=xxx queries

- use same policies as papers#show
add ember route /papers/:publisher/:journal.number

It fetches the model from the special rails route /papers?doi=...

This new ember route acts almost the same as the /papers/:paper_id ember route.
Add Paper.find_by_id_or_doi finder method
Clean up code quality issues

I'm not moving anything outside of this file, but the private method
tasks_metadata should be moved to the relationship or foreign model
Cast id/doi to respective type before sending on
Add doi routing in Ember and in Rails
Improve DOI lookup

Previously, when given a DOI, the Paper model was calling find
with an ID, and failing with a non-id lookup. This was problematic. One,
if the journal prefix happened to be the same as a paper, this would
have created bogus paper entries. Additionally, two lookups were
required to get a Paper record.

The current approach is to:

1. Check numericality of the id param

2. If it's an integer, perform the lookup based upon an id value.
Otherwise, continue to lookup the Paper using the doi.
Add database index for doi on papers
Merge branch 'master' into flow-manager-title
[#83052026] Edit flow title