Code Duplication    Length = 7-7 lines in 6 locations

app/Policies/AttachmentPolicy.php 1 location

@@ 15-21 (lines=7) @@
12
{
13
    use HandlesAuthorization;
14
15
    public function before(UserInterface $user)
16
    {
17
        $this->dd(__METHOD__);
18
        if ($user instanceof UserInterface && ($user->isAdmin() || $user->isManager())) {
19
            return true;
20
        }
21
    }
22
23
    /**
24
     * Determine whether the user can view the attachment.

app/Policies/CommentPolicy.php 1 location

@@ 35-41 (lines=7) @@
32
{
33
    use HandlesAuthorization, ProjectAccess;
34
35
    public function before(UserInterface $user)
36
    {
37
        $this->dd(__METHOD__);
38
        if ($user instanceof UserInterface && ($user->isAdmin() || $user->isManager())) {
39
            return true;
40
        }
41
    }
42
43
    /**
44
     * Determine whether the user can view the comment.

app/Policies/NotePolicy.php 1 location

@@ 35-41 (lines=7) @@
32
{
33
    use HandlesAuthorization, ProjectAccess;
34
35
    public function before(UserInterface $user)
36
    {
37
        $this->dd(__METHOD__);
38
        if ($user instanceof UserInterface && ($user->isAdmin() || $user->isManager())) {
39
            return true;
40
        }
41
    }
42
43
    /**
44
     * Determine whether the user can view the note.

app/Policies/ProjectPolicy.php 1 location

@@ 33-39 (lines=7) @@
30
{
31
    use HandlesAuthorization, ProjectAccess;
32
33
    public function before(UserInterface $user)
34
    {
35
        $this->dd(__METHOD__);
36
        if ($user instanceof UserInterface && ($user->isAdmin() || $user->isManager())) {
37
            return true;
38
        }
39
    }
40
41
    /**
42
     * Determine whether the user can view the project.

app/Policies/TagPolicy.php 1 location

@@ 35-41 (lines=7) @@
32
{
33
    use HandlesAuthorization;
34
35
    public function before(UserInterface $user)
36
    {
37
        $this->dd(__METHOD__);
38
        if ($user instanceof UserInterface && ($user->isAdmin() || $user->isManager())) {
39
            return true;
40
        }
41
    }
42
43
    /**
44
     * Determine whether the user can view the project.

app/Policies/UserPolicy.php 1 location

@@ 27-33 (lines=7) @@
24
{
25
    use HandlesAuthorization;
26
27
    public function before(UserInterface $user)
28
    {
29
        $this->dd(__METHOD__);
30
        if ($user instanceof UserInterface && ($user->isAdmin() || $user->isManager())) {
31
            return true;
32
        }
33
    }
34
35
    /**
36
     * Determine if the given user can manages administrator area.