/
Plugin.php
40 lines (35 loc) · 1.06 KB
/
Plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace Kanboard\Plugin\CommentOnly;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
use Kanboard\Core\Security\Role;
class Plugin extends Base
{
public function initialize()
{
$this->projectAccessMap->add('CommentController', array('create', 'save', 'edit', 'update', 'confirm', 'remove'), Role::PROJECT_VIEWER);
$this->projectAccessMap->add('CommentListController', array('save'), Role::PROJECT_VIEWER);
$this->projectAccessMap->add('CommentMailController', '*', Role::PROJECT_VIEWER);
$this->template->hook->attach('template:task:sidebar:information', 'CommentOnly:task/sidebar');
}
public function getPluginName()
{
return 'Comment Only Restrictions for Project Viewers';
}
public function getPluginAuthor()
{
return 'Craig Crosby';
}
public function getPluginVersion()
{
return '0.0.2';
}
public function getPluginDescription()
{
return 'Adds Commenting abilities for Project Viewers';
}
public function getPluginHomepage()
{
return 'https://github.com/creecros/opencomment';
}
}