Code Duplication    Length = 15-15 lines in 3 locations

src/controllers/BackupingController.php 1 location

@@ 29-43 (lines=15) @@
26
27
class BackupingController extends \hipanel\base\CrudController
28
{
29
    public function behaviors()
30
    {
31
        return ArrayHelper::merge(parent::behaviors(), [
32
            'manage-access' => [
33
                'class' => AccessControl::class,
34
                'only' => ['update'],
35
                'rules' => [
36
                    [
37
                        'allow' => true,
38
                        'roles' => ['support'],
39
                    ],
40
                ],
41
            ],
42
        ]);
43
    }
44
45
    public function actions()
46
    {

src/controllers/IpController.php 1 location

@@ 32-46 (lines=15) @@
29
30
class IpController extends \hipanel\base\CrudController
31
{
32
    public function behaviors()
33
    {
34
        return ArrayHelper::merge(parent::behaviors(), [
35
            'manage-access' => [
36
                'class' => AccessControl::class,
37
                'only'  => ['create', 'update', 'delete'],
38
                'rules' => [
39
                    [
40
                        'allow'   => true,
41
                        'roles'   => ['admin'],
42
                    ],
43
                ],
44
            ],
45
        ]);
46
    }
47
48
    public function actions()
49
    {

src/controllers/ServiceController.php 1 location

@@ 34-48 (lines=15) @@
31
32
class ServiceController extends \hipanel\base\CrudController
33
{
34
    public function behaviors()
35
    {
36
        return ArrayHelper::merge(parent::behaviors(), [
37
            'manage-access' => [
38
                'class' => AccessControl::class,
39
                'only'  => ['create', 'update', 'delete'],
40
                'rules' => [
41
                    [
42
                        'allow'   => true,
43
                        'roles'   => ['admin'],
44
                    ],
45
                ],
46
            ],
47
        ]);
48
    }
49
50
    public function actions()
51
    {