Code Duplication    Length = 1-3 lines in 2 locations

manager/includes/src/Legacy/Permissions.php 2 locations

@@ 50-50 (lines=1) @@
47
        }
48
49
        $parent = $modx->db->getValue($modx->db->select('parent', $tblsc, "id='{$this->document}'"));
50
        if ($document == 0 && $parent == null && $udperms_allowroot == 1) {
51
            return true;
52
        } // User is allowed to create new document in root
53
        if (($this->duplicateDoc == true || $document == 0) && $parent == 0 && $udperms_allowroot == 0) {
@@ 53-55 (lines=3) @@
50
        if ($document == 0 && $parent == null && $udperms_allowroot == 1) {
51
            return true;
52
        } // User is allowed to create new document in root
53
        if (($this->duplicateDoc == true || $document == 0) && $parent == 0 && $udperms_allowroot == 0) {
54
            return false; // deny duplicate || create new document at root if Allow Root is No
55
        }
56
57
        // get document groups for current user
58
        $docgrp = empty($_SESSION['mgrDocgroups']) ? '' : implode(' || dg.document_group = ',