collect: addition of sorting filter

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
uploader: initial manage command implementation

* Adds basic `inveniomanage uplaoder insert -f FILE` command.
  (addresses #1772)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
sqlalchemy: fix mysql index creation

* Fixes checking of Text type supporting the case of NullType
  column type.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
groups: port missing functionality

* Adds implementation of user group manage function.

* Adds filter on list of group that user can join.
  (closes #1788)

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
general: WTForms 2 compatibility fixes

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
base: bundle less filename correction

* Corrects the less JS bundle filename to avoid causing a file
  not found error for this file while building assets.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
records: display tabs

* Creates a new `record.tabs` menu using Flask-Menu.

* Adds the `visible_when` attribute and the `count` keyword argument.

* Amends the main `record` template.

* Uses Flask-Cache to memoize the function for finding
  the `visible tabs`.

* Upgrades Flask-Breadcrumbs and Flask-Menu to 0.2 version.
  (closes #1646)

Signed-off-by: Eirini Psallida <eirini.psallida@cern.ch>
sqlalchemy: default mysql parameters for db.Table

* Adds default parameters to `db.Table` constructor to force MyISAM
  engine for MySQL backend. db.Table is InnoDB by default on modern
  versions of MySQL. Hence, foreign keys can now be set on
  `db.Model` fields because both are using MyISAM as an engine.
  (closes #2491)

Signed-off-by: Artem Tsikiridis <artem.tsikiridis@cern.ch>
Reviewed-by: Gilles Louppe <gilles.louppe@cern.ch>
access: infinite recursion hotfix

* Temporary fix for the occasional issue causing infinite recursion
  error upon loading the session. (addresses #2509)

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
jasmine: adaptation to requirejs

* Utilises boot.js from jasmine.

* Ensures that there is no jQuery conflict when a js file loads
  jQuery with requirejs with jasmine configuration test.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
installation: disable SSLv3 in Apache config

* Disables SSLv3.0 due to known vulnerability.  (closes #2515)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
oauth2server: access and refresh tokens encrytion

* Uses encryption field for seamless encryption/decryption of the access
  and refresh tokens. (addresses #2127)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
oauthclient: access token encryption

* Uses encryption field for seamless encryption/decryption of the access
  tokens. (closes #2127)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
workflows: actions JS loading

* Makes the JavaScript assets loading for actions separated from
  the general assets loading to allow for easier additions of
  actions on overlays.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: documentation enrichment

* Enriches the documentation of the Workflows module by adding
  more information on actions and the Holding Pen.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: task_counter value check

* Checks if the task_counter parameter is a list when saving
  an BibWorkflowObject. It is required to avoid a problem with the
  underlying workflow engine.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: Holding Pen details fix

* Fixes a problem where the detailed page for Holding Pen
  object caused an exception when information on next/previous
  objects from the table were missing.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
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>