summaryrefslogtreecommitdiff
path: root/app/Action/TaskAssignUser.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-03 16:43:13 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-03 16:43:13 -0500
commita296ba5b18487d312acca2513d461a210a460fae (patch)
treee5e22ffa7796a9734ec284826dd313219644a539 /app/Action/TaskAssignUser.php
parentd578b612ea8853682f65ee74fd08f4893152d87a (diff)
Improve Automatic Actions plugin api
Diffstat (limited to 'app/Action/TaskAssignUser.php')
-rw-r--r--app/Action/TaskAssignUser.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/Action/TaskAssignUser.php b/app/Action/TaskAssignUser.php
index a5821729..bb3a83c2 100644
--- a/app/Action/TaskAssignUser.php
+++ b/app/Action/TaskAssignUser.php
@@ -14,6 +14,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
*
* @access public
@@ -78,6 +89,6 @@ class TaskAssignUser extends Base
*/
public function hasRequiredCondition(array $data)
{
- return true;
+ return $this->projectPermission->isAssignable($this->getProjectId(), $data['owner_id']);
}
}