Passed
Push — master ( be42c8...453af3 )
by Darko
13:08 queued 03:26
created

ForumPolicy::deleteThreads()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Policies;
4
5
class ForumPolicy extends \TeamTeaTime\Forum\Policies\ForumPolicy
6
{
7
    /**
8
     * Create a new policy instance.
9
     */
10
    public function __construct()
11
    {
12
        //
13
    }
14
15
    public function createCategories($user): bool
16
    {
17
        return $user->hasRole('Admin');
18
    }
19
20
    public function manageCategories($user): bool
21
    {
22
        return $user->hasRole('Admin');
23
    }
24
25
    public function moveCategories($user): bool
26
    {
27
        return $user->hasRole('Admin');
28
    }
29
30
    public function renameCategories($user): bool
31
    {
32
        return $user->hasRole('Admin');
33
    }
34
35
    public function viewTrashedThreads($user): bool
36
    {
37
        return $user->hasRole('Admin');
38
    }
39
40
    public function viewTrashedPosts($user): bool
41
    {
42
        return $user->hasRole('Admin');
43
    }
44
45
    public function deleteCategories($user): bool
46
    {
47
        return $user->hasRole('Admin');
48
    }
49
50
    public function deletePosts($user): bool
51
    {
52
        return $user->hasRole('Admin');
53
    }
54
55
    public function deleteThreads($user): bool
56
    {
57
        return $user->hasRole('Admin');
58
    }
59
60
    public function restorePosts($user): bool
61
    {
62
        return $user->hasRole('Admin');
63
    }
64
65
    public function restoreThreads($user): bool
66
    {
67
        return $user->hasRole('Admin');
68
    }
69
70
    public function purgePosts($user): bool
71
    {
72
        return $user->hasRole('Admin');
73
    }
74
75
    public function purgeThreads($user): bool
76
    {
77
        return $user->hasRole('Admin');
78
    }
79
80
    public function deleteThrashedPosts($user): bool
81
    {
82
        return $user->hasRole('Admin');
83
    }
84
}
85