geonetwork/core-geonetwork — pull request #599 by pmauduit (2014-07-25 09:26:55+00:00)
Title: 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.