N°4142 - Add config. param. to hide user avatars in the GUIs -mostly in logs- (backoffice, end-users portal, ...)

This commit is contained in:
Molkobain
2021-07-15 17:35:47 +02:00
parent 4843545171
commit dfbbee2a1c
3 changed files with 28 additions and 6 deletions

View File

@@ -221,9 +221,13 @@ class ActivityEntry extends UIBlock
// - Initials
$this->sAuthorInitials = UserRights::GetUserInitials($this->sAuthorLogin);
// - Picture
$this->sAuthorPictureAbsUrl = UserRights::GetUserPictureAbsUrl($this->sAuthorLogin, false);
if ((null === $this->sAuthorPictureAbsUrl) && (ITOP_APPLICATION_SHORT === $this->sAuthorLogin)) {
$this->sAuthorPictureAbsUrl = utils::GetAbsoluteUrlAppRoot().static::DEFAULT_AUTHOR_PICTURE_REL_URL;
if (in_array('backoffice', utils::GetConfig()->Get('activity_panel.hide_avatars'))) {
$this->sAuthorPictureAbsUrl = null;
} else {
$this->sAuthorPictureAbsUrl = UserRights::GetUserPictureAbsUrl($this->sAuthorLogin, false);
if ((null === $this->sAuthorPictureAbsUrl) && (ITOP_APPLICATION_SHORT === $this->sAuthorLogin)) {
$this->sAuthorPictureAbsUrl = utils::GetAbsoluteUrlAppRoot().static::DEFAULT_AUTHOR_PICTURE_REL_URL;
}
}
$this->bIsFromCurrentUser = UserRights::GetUserId($this->sAuthorLogin) === UserRights::GetUserId();