summaryrefslogtreecommitdiff
path: root/app/Model/ProjectRoleRestrictionModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-09-17 20:36:18 -0400
committerFrederic Guillot <fred@kanboard.net>2016-09-17 20:36:18 -0400
commit4bc83646b0b15bff9ae55083121f66b7a89e433d (patch)
tree941a2710bc3e1926a5e8cdbdeaaa797612dfb819 /app/Model/ProjectRoleRestrictionModel.php
parent0e055eabe1a7d0e077105f6e9cc48057c9540443 (diff)
Add project restriction for opening/closing tasks
Diffstat (limited to 'app/Model/ProjectRoleRestrictionModel.php')
-rw-r--r--app/Model/ProjectRoleRestrictionModel.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/Model/ProjectRoleRestrictionModel.php b/app/Model/ProjectRoleRestrictionModel.php
index 0411838d..7679f650 100644
--- a/app/Model/ProjectRoleRestrictionModel.php
+++ b/app/Model/ProjectRoleRestrictionModel.php
@@ -13,11 +13,16 @@ use Kanboard\Core\Base;
class ProjectRoleRestrictionModel extends Base
{
const TABLE = 'project_role_has_restrictions';
- const RULE_TASK_CREATION = 'task_creation';
+
+ const RULE_TASK_CREATION = 'task_creation';
+ const RULE_TASK_OPEN_CLOSE = 'task_open_close';
protected $ruleMapping = array(
self::RULE_TASK_CREATION => array(
array('controller' => 'TaskCreationController', 'method' => '*'),
+ ),
+ self::RULE_TASK_OPEN_CLOSE => array(
+ array('controller' => 'TaskStatusController', 'method' => '*'),
)
);
@@ -29,7 +34,8 @@ class ProjectRoleRestrictionModel extends Base
public function getRules()
{
return array(
- self::RULE_TASK_CREATION => t('Task creation is not permitted'),
+ self::RULE_TASK_CREATION => t('Task creation is not permitted'),
+ self::RULE_TASK_OPEN_CLOSE => t('Closing or opening a task is not permitted'),
);
}