Code Duplication    Length = 9-10 lines in 2 locations

Alpha/Controller/Controller.php 2 locations

@@ 1073-1081 (lines=9) @@
1070
            if ($session->get('currentUser') !== false) {
1071
1072
                // if the visibility is 'Session', just being logged in enough
1073
                if ($this->getVisibility() == 'Session') {
1074
                    if (method_exists($this, 'after_checkRights_callback')) {
1075
                        $this->after_checkRights_callback();
1076
                    }
1077
1078
                    self::$logger->debug('<<checkRights [true]');
1079
1080
                    return true;
1081
                }
1082
1083
                // checking for admins (can access everything)
1084
                if ($session->get('currentUser')->inGroup('Admin')) {
@@ 1092-1101 (lines=10) @@
1089
                    self::$logger->debug('<<checkRights [true]');
1090
1091
                    return true;
1092
                } elseif ($session->get('currentUser')->inGroup($this->getVisibility())) {
1093
                    if (method_exists($this, 'after_checkRights_callback')) {
1094
                        $this->after_checkRights_callback();
1095
                    }
1096
1097
                    self::$logger->debug('<<checkRights [true]');
1098
1099
                    return true;
1100
                // the person is editing their own profile which is allowed
1101
                } elseif (get_class($this->record) == 'Alpha\Model\Person' && $session->get('currentUser')->getDisplayName() == $this->record->getDisplayName()) {
1102
                    if (method_exists($this, 'after_checkRights_callback')) {
1103
                        $this->after_checkRights_callback();
1104
                    }