Skip to content

Add generic avatar method for users and groups

What does this MR do?

We were using user_avatar_without_link(user: project.owner) to display the avatar for the project owner, but the project owner can be a group, not only a user. Changes like !52051 (merged) which break the compatibility between users and groups make the CI/CD settings page inaccessible.

Related to #300874 (closed)

Screenshots (strongly suggested)

Before:

image

After:

Screen_Shot_2021-04-20_at_10.21.25

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Marius Bobin

Merge request reports