Add new project restriction to block assignee change

This commit is contained in:
Frederic Guillot
2017-04-05 22:53:54 -04:00
parent 22f48ea289
commit 481e767d35
6 changed files with 93 additions and 10 deletions

View File

@@ -93,6 +93,10 @@ class TaskHelper extends Base
public function renderAssigneeField(array $users, array $values, array $errors = array(), array $attributes = array())
{
if (isset($values['project_id']) && ! $this->helper->projectRole->canChangeAssignee($values)) {
return '';
}
$attributes = array_merge(array('tabindex="3"'), $attributes);
$html = $this->helper->form->label(t('Assignee'), 'owner_id');