Completed
Push — master ( 96a0f4...96dd95 )
by ARCANEDEV
03:51
created

LogViewerPolicy::downloadPolicy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php namespace Arcanesoft\Foundation\Policies;
2
3
use Arcanesoft\Contracts\Auth\Models\User;
4
5
/**
6
 * Class     LogViewerPolicy
7
 *
8
 * @package  Arcanesoft\Foundation\Policies
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class LogViewerPolicy
12
{
13
    public function dashboardPolicy(User $user)
14
    {
15
        return $user->may('foundation.logviewer.dashboard');
16
    }
17
18
    public function listPolicy(User $user)
19
    {
20
        return $user->may('foundation.logviewer.list');
21
    }
22
23
    public function showPolicy(User $user)
24
    {
25
        return $user->may('foundation.logviewer.show');
26
    }
27
28
    public function downloadPolicy(User $user)
29
    {
30
        return $user->may('foundation.logviewer.download');
31
    }
32
33
    public function deletePolicy(User $user)
34
    {
35
        return $user->may('foundation.logviewer.delete');
36
    }
37
}
38