Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 11086 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11086 Rev 11138
Línea 118... Línea 118...
118
                    }
118
                    }
Línea 119... Línea 119...
119
                    
119
                    
120
                }
120
                }
Línea -... Línea 121...
-
 
121
            }
-
 
122
 
-
 
123
            if(!$group_uuid) {
-
 
124
                $data = [
-
 
125
                    'success'   => false,
-
 
126
                    'data'   => 'ERROR_INVALID_PARAMETER'
-
 
127
                ];
-
 
128
                
-
 
129
                return new JsonModel($data);
121
            }
130
            }
122
 
131
            
Línea 123... Línea 132...
123
            $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
132
            $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
124
            $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
133
            $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
125
            
134
            
126
            if (!$highPerformanceTeamsGroups) {
135
            if (!$highPerformanceTeamsGroups) {
127
                $data = [
136
                $data = [
128
                    'success' => false,
137
                    'success' => false,
129
                    'data' => 'ERROR_RECORD_NOT_FOUND'
138
                    'data' => 'ERROR_RECORD_NOT_FOUND'
130
                ];
139
                ];
131
 
-
 
132
                return new JsonModel($data);
140
    
Línea 133... Línea 141...
133
            }
141
                return new JsonModel($data);
134
           
142
            }
135
            if($highPerformanceTeamsGroups->status != HighPerformanceTeamsGroups::STATUS_ACTIVE) {
143
            if($highPerformanceTeamsGroups->status != HighPerformanceTeamsGroups::STATUS_ACTIVE) {
136
 
144
 
Línea 137... Línea 145...
137
                return new JsonModel([
145
                return new JsonModel([
-
 
146
                    'success' => false,
-
 
147
                    'data' => 'ERROR_UNAUTHORIZED'
-
 
148
                ]);
-
 
149
 
-
 
150
            } 
-
 
151
            $highPerformanceTeamsGroupsMembersMapper = HighPerformanceTeamsGroupsMembersMapper::getInstance($this->adapter);
-
 
152
            $highPerformanceTeamsGroupsMember = $highPerformanceTeamsGroupsMembersMapper->fetchOneByGroupIdAndUserId($highPerformanceTeamsGroups->id, $currentUser->id);
-
 
153
            if(!$highPerformanceTeamsGroupsMember) {
-
 
154
                return new JsonModel([
-
 
155
                    'success' => false,
-
 
156
                    'data' => 'ERROR_YOU_DO_NOT_HAVE_ACCESS'
-
 
157
                ]);
-
 
158
            }
-
 
159
            if(!($highPerformanceTeamsGroupsMember->status == HighPerformanceTeamsGroupsMembers::STATUS_ACCEPTED || $highPerformanceTeamsGroupsMember->status == HighPerformanceTeamsGroupsMembers::STATUS_ADDED_BY_ADMIN) ){
138
                    'success' => false,
160
                return new JsonModel([
139
                    'data' => 'ERROR_UNAUTHORIZED'
161
                    'success' => false,
140
                ]);
162
                    'data' => 'ERROR_YOU_DO_NOT_HAVE_ACCESS'
141
 
163
                ]);
142
            } 
164
            }
143
            
165