@@ 123-134 (lines=12) @@ | ||
120 | * |
|
121 | * @return bool |
|
122 | */ |
|
123 | public function canCreateTaskInColumn($project_id, $column_id) |
|
124 | { |
|
125 | $role = $this->getProjectUserRole($project_id); |
|
126 | ||
127 | if ($this->role->isCustomProjectRole($role)) { |
|
128 | if (!$this->isAllowedToCreateTask($project_id, $column_id, $role)) { |
|
129 | return false; |
|
130 | } |
|
131 | } |
|
132 | ||
133 | return $this->helper->user->hasProjectAccess('Task/TaskController', 'create', $project_id); |
|
134 | } |
|
135 | ||
136 | /** |
|
137 | * Return true if the user can create a task for the given column. |
|
@@ 144-155 (lines=12) @@ | ||
141 | * |
|
142 | * @return bool |
|
143 | */ |
|
144 | public function canChangeTaskStatusInColumn($project_id, $column_id) |
|
145 | { |
|
146 | $role = $this->getProjectUserRole($project_id); |
|
147 | ||
148 | if ($this->role->isCustomProjectRole($role)) { |
|
149 | if (!$this->isAllowedToChangeTaskStatus($project_id, $column_id, $role)) { |
|
150 | return false; |
|
151 | } |
|
152 | } |
|
153 | ||
154 | return $this->helper->user->hasProjectAccess('Task/TaskStatusController', 'close', $project_id); |
|
155 | } |
|
156 | ||
157 | /** |
|
158 | * Return true if the user can remove a task. |