mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°7746 - Caselog edition button active even if the user has a read-only access to the object
This commit is contained in:
@@ -763,7 +763,7 @@ class ActivityPanel extends UIBlock
|
||||
*/
|
||||
public function IsComposeButtonEnabled(): bool
|
||||
{
|
||||
return $this->HasAnEditableCaseLogTab() && $this->IsCaseLogsSubmitAutonomous();
|
||||
return $this->HasAnEditableCaseLogTab() && $this->IsCaseLogsSubmitAutonomous() && $this->HasUserModifyRights();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -974,4 +974,14 @@ class ActivityPanel extends UIBlock
|
||||
$this->bShowMultipleEntriesSubmitConfirmation = appUserPreferences::GetPref('activity_panel.show_multiple_entries_submit_confirmation', static::DEFAULT_SHOW_MULTIPLE_ENTRIES_SUBMI_CONFIRMATION) !== 'false';
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws \CoreException
|
||||
*/
|
||||
protected function HasUserModifyRights(): bool
|
||||
{
|
||||
return \UserRights::IsActionAllowed($this->GetObjectClass(), UR_ACTION_MODIFY);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user