Replace use of Project#authorized_for_user? with ProjectTeam#member?
We have at least two optimised project access lookup methods:
As the latter is only used in one place, we should be able to:
-
Replace the one usage of Project#authorized_for_user?
withProjectTeam#member?
. -
Keep the best optimisations from both - it looks like Project#authorized_for_user?
short-circuits if it finds matching access, so that could be useful. -
Ensure that the max access level setting on project group links is respected, as Project#authorized_for_user?
doesn't look like it does this (I haven't checked, though).