Improve Automatic Actions plugin api

This commit is contained in:
Frederic Guillot
2016-01-03 16:43:13 -05:00
parent d578b612ea
commit a296ba5b18
82 changed files with 3011 additions and 1665 deletions

View File

@@ -13,6 +13,17 @@ use Kanboard\Integration\BitbucketWebhook;
*/
class TaskAssignUser extends Base
{
/**
* Get automatic action description
*
* @access public
* @return string
*/
public function getDescription()
{
return t('Change the assignee based on an external username');
}
/**
* Get the list of compatible events
*
@@ -78,6 +89,6 @@ class TaskAssignUser extends Base
*/
public function hasRequiredCondition(array $data)
{
return true;
return $this->projectPermission->isAssignable($this->getProjectId(), $data['owner_id']);
}
}