Search / Remove resource type criteria from language detection (as it push to always detect english).
core - issue in calculating hasEditPermission

Currently, the ORM translation of the SQL query that is made to the
database to check whether a user can edit a MD or not (depending on
which group he belongs to) is the following:

"SELECT
  ...
FROM
  ...
WHERE
  user is EDITOR
AND
  userID = id
AND
  groupID = x AND groupID = y AND groupID = z ..."

The correct request that has to be made should end up with
"[...]
AND
  groupID IN (x,y,z,...)"
instead.

The following patch implements this "IN / OR" logic.
Tested manually, but please review.
fixing hasEditPermission

Taking into account remarks issued from PR.
Merge pull request #599 from pmauduit/fix-hasEditPermissions

core - issue in calculating hasEditPermission
Merge remote-tracking branch 'upstream/stable-develop' into develop