Completed
Push — develop ( 508664...7b00fe )
by Abdelrahman
01:58
created

CortexAuthSeeder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 71
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 63 1
1
<?php
2
3
declare(strict_types=1);
4
5
use Illuminate\Database\Seeder;
6
7
class CortexAuthSeeder extends Seeder
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
8
{
9
    /**
10
     * Run the database seeds.
11
     *
12
     * @return void
13
     */
14
    public function run()
15
    {
16
        Bouncer::allow('superadmin')->everything();
17
18
        Bouncer::allow('admin')->to('list', config('cortex.auth.models.ability'));
19
        Bouncer::allow('admin')->to('create', config('cortex.auth.models.ability'));
20
        Bouncer::allow('admin')->to('update', config('cortex.auth.models.ability'));
21
        Bouncer::allow('admin')->to('delete', config('cortex.auth.models.ability'));
22
        Bouncer::allow('admin')->to('audit', config('cortex.auth.models.ability'));
23
        Bouncer::allow('admin')->to('grant', config('cortex.auth.models.ability'));
24
25
        Bouncer::allow('admin')->to('list', config('cortex.auth.models.role'));
26
        Bouncer::allow('admin')->to('create', config('cortex.auth.models.role'));
27
        Bouncer::allow('admin')->to('update', config('cortex.auth.models.role'));
28
        Bouncer::allow('admin')->to('delete', config('cortex.auth.models.role'));
29
        Bouncer::allow('admin')->to('audit', config('cortex.auth.models.role'));
30
        Bouncer::allow('admin')->to('assign', config('cortex.auth.models.role'));
31
32
        Bouncer::allow('admin')->to('list', config('cortex.auth.models.admin'));
33
        Bouncer::allow('admin')->to('create', config('cortex.auth.models.admin'));
34
        Bouncer::allow('admin')->to('update', config('cortex.auth.models.admin'));
35
        Bouncer::allow('admin')->to('delete', config('cortex.auth.models.admin'));
36
        Bouncer::allow('admin')->to('audit', config('cortex.auth.models.admin'));
37
38
        Bouncer::allow('admin')->to('list', config('cortex.auth.models.member'));
39
        Bouncer::allow('admin')->to('create', config('cortex.auth.models.member'));
40
        Bouncer::allow('admin')->to('update', config('cortex.auth.models.member'));
41
        Bouncer::allow('admin')->to('delete', config('cortex.auth.models.member'));
42
        Bouncer::allow('admin')->to('audit', config('cortex.auth.models.member'));
43
44
        Bouncer::allow('admin')->to('list', config('cortex.auth.models.manager'));
45
        Bouncer::allow('admin')->to('create', config('cortex.auth.models.manager'));
46
        Bouncer::allow('admin')->to('update', config('cortex.auth.models.manager'));
47
        Bouncer::allow('admin')->to('delete', config('cortex.auth.models.manager'));
48
        Bouncer::allow('admin')->to('audit', config('cortex.auth.models.manager'));
49
50
        Bouncer::allow('admin')->to('list', config('cortex.auth.models.guardian'));
51
        Bouncer::allow('admin')->to('create', config('cortex.auth.models.guardian'));
52
        Bouncer::allow('admin')->to('update', config('cortex.auth.models.guardian'));
53
        Bouncer::allow('admin')->to('delete', config('cortex.auth.models.guardian'));
54
        Bouncer::allow('admin')->to('audit', config('cortex.auth.models.guardian'));
55
56
        Bouncer::allow('owner')->to('list', config('cortex.auth.models.role'));
57
        Bouncer::allow('owner')->to('create', config('cortex.auth.models.role'));
58
        Bouncer::allow('owner')->to('update', config('cortex.auth.models.role'));
59
        Bouncer::allow('owner')->to('delete', config('cortex.auth.models.role'));
60
        Bouncer::allow('owner')->to('audit', config('cortex.auth.models.role'));
61
        Bouncer::allow('owner')->to('assign', config('cortex.auth.models.role'));
62
63
        Bouncer::allow('owner')->to('list', config('cortex.auth.models.member'));
64
        Bouncer::allow('owner')->to('create', config('cortex.auth.models.member'));
65
        Bouncer::allow('owner')->to('update', config('cortex.auth.models.member'));
66
        Bouncer::allow('owner')->to('delete', config('cortex.auth.models.member'));
67
        Bouncer::allow('owner')->to('audit', config('cortex.auth.models.member'));
68
69
        Bouncer::allow('owner')->to('list', config('cortex.auth.models.manager'));
70
        Bouncer::allow('owner')->to('create', config('cortex.auth.models.manager'));
71
        Bouncer::allow('owner')->to('update', config('cortex.auth.models.manager'));
72
        Bouncer::allow('owner')->to('delete', config('cortex.auth.models.manager'));
73
        Bouncer::allow('owner')->to('audit', config('cortex.auth.models.manager'));
74
75
        Bouncer::allow('owner')->to('grant', config('cortex.auth.models.ability'));
76
    }
77
}
78