Fix calculation of project owners
When calculating the owners of a project the ref pattern to which the
OWN access rights are assigned are ignored and the inherited OWN
access rights are also not taken into account.
There are two use-cases for which the owners of a project must be
calculated:
1. e-mail notification for project owners about new changes:
This e-mail notification should only be sent to the local project
owners (the groups to which the OWN access right is assigned on this
project). In case there are no local owners for a project this e-mail
notification should be sent to the local owners of the nearest parent
project that has local owners.
2. resolving of the system group 'Project Owners':
The 'Project Owners' system group should be resolved to all groups
that are allowed to administrate the project. These are the local
owners plus the inherited owners.
For both use cases we have to filter the OWN access rights to only
those access rights that are assigned for the ref pattern 'refs/*'.
This change implements the logic described above.
Change-Id: Ib90014caf628db00250694f00741076db0492113
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2 files changed