N°2039 - Send news only to Person with at least 1 active user which has access to the backoffice

This commit is contained in:
Molkobain
2024-04-30 11:26:42 +02:00
parent 7b35692ce6
commit f7bbbbbe87
2 changed files with 32 additions and 3 deletions

View File

@@ -9,11 +9,17 @@ class PortalDispatcher
$this->sPortalid = $sPortalId;
$this->aData = PortalDispatcherData::GetData($sPortalId);
}
public function IsUserAllowed()
/**
* @param \User|null $oUser
*
* @return bool
* @since 3.2.0 N°2039 Add $oUser parameter
*/
public function IsUserAllowed(?User $oUser = null)
{
$bRet = true;
$aProfiles = UserRights::ListProfiles();
$aProfiles = UserRights::ListProfiles($oUser);
foreach($this->aData['deny'] as $sDeniedProfile)
{