-
Notifications
You must be signed in to change notification settings - Fork 36
/
CreateTask.php
65 lines (56 loc) · 1.29 KB
/
CreateTask.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/
namespace humhub\modules\tasks\permissions;
use humhub\modules\user\models\User;
use Yii;
use humhub\libs\BasePermission;
use humhub\modules\space\models\Space;
/**
* CreateTask Permission
*/
class CreateTask extends BasePermission
{
/**
* @inheritdoc
*/
protected $moduleId = 'tasks';
/**
* @inheritdoc
*/
public $defaultAllowedGroups = [
Space::USERGROUP_OWNER,
Space::USERGROUP_ADMIN,
Space::USERGROUP_MODERATOR,
Space::USERGROUP_MEMBER,
User::USERGROUP_SELF,
];
/**
* @inheritdoc
*/
protected $fixedGroups = [
Space::USERGROUP_USER,
Space::USERGROUP_GUEST,
User::USERGROUP_SELF,
User::USERGROUP_FRIEND,
User::USERGROUP_USER,
User::USERGROUP_GUEST
];
/**
* @inheritdoc
*/
public function getTitle()
{
return Yii::t('TasksModule.base', 'Create tasks');
}
/**
* @inheritdoc
*/
public function getDescription()
{
return Yii::t('TasksModule.base', 'Allows the user to create new tasks, the user will only be able to edit and delete own tasks');
}
}