workflows: always save current object

* Adds missing saving points of BibWorkflowObjects in the workflow
  engine when using engine execution manipulation functions such
  as `continueNextToken()`, `jumpTokenBack()`, `jumpTokenForward()`.

* Removes duplicate setting of error_msg.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
access: fix PEP8 and PEP257 for models

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
access: new has_(super)_admin_role methods

* Adds new properties to `User` model in order to ease access control
  calculations.  (closes #2509)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
access: Flask-Admin interface addition

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
legacy: webuser usage cleanup

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
utils: datacite ssl protocol fix

* Fixes issue with SSL protocol version due to change by DataCite.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
debug_toolbar: error reporting fix

* Fixes an issue where an error message would be produced even if
  Flask-DebugToolbar was explicitly disabled via DEBUG_TB_ENABLED
  set to False.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
email: celery error email fix

* Fixes issue with celery not sending error emails due to config
  variable ADMIN being set different by the Flask Email extension.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
webhooks: minor documentation update

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
tests: testsuite iteration fix

* Fixes invalid attribute access to application configuration.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
search: requirejs facets fix

* Wraps facets JavasScript module in requirejs definition.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: jquery datepicker leftovers

* Removes jQueryUI css which is no longer needed after integrating
  bootstrap-datetimepicker.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: form button click fix

* Fixes refactoring issue with form button clicks not being sent to
  server.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
deposit: field_display kwargs support

* Adds support for passing kwargs to Jinja macro field_display
  that can pass it to the field. This is useful for passing
  attributes to specific field widgets like (e.g. rows/cols
  for a textarea).

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
knowledge: API migration to SQLAlchemy

* Replaces run_sql queries with SQLAlchemy query.

* Refactors module in order to move logic from api to model.

* Fixes bibknowledge webinterface kb mapping update.

* NOTE If you are running Invenio 1 and Invenio 2 on top of
  the same database, please use only Invenio 2 knowledge base
  administration interface from now on, in order to ensure
  data consistency.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
search: fix for search typeahead configuration

* Lets search typeahead syntax be configurable again after moving
  typeahead configuration fo form.js in commit
  3ed48581607a534319c0b1624a20b84016c4a649

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>