Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 11136 Rev 11184
Línea 106... Línea 106...
106
                }
106
                }
107
            }
107
            }
Línea 108... Línea 108...
108
 
108
 
109
            $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
109
            $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
110
            $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
-
 
-
 
110
            $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
-
 
111
            $this->layout()->setTemplate('layout/layout-backend');
111
            
112
            $viewModel = new ViewModel();
112
            if (!$highPerformanceTeamsGroups) {
-
 
113
                $data = [
-
 
114
                    'success' => false,
113
            if (!$highPerformanceTeamsGroups) {
115
                    'data' => 'ERROR_RECORD_NOT_FOUND'
-
 
116
                ];
-
 
117
 
114
                $viewModel->setTemplate('leaders-linked/no-access/index.phtml');
118
                return new JsonModel($data);
115
                return $viewModel ;
Línea 119... Línea 116...
119
            }
116
            }
Línea 120... Línea 117...
120
           
117
           
121
            if($highPerformanceTeamsGroups->status != HighPerformanceTeamsGroups::STATUS_ACTIVE) {
118
            if($highPerformanceTeamsGroups->status != HighPerformanceTeamsGroups::STATUS_ACTIVE) {
122
 
-
 
123
                return new JsonModel([
-
 
Línea 124... Línea 119...
124
                    'success' => false,
119
 
125
                    'data' => 'ERROR_UNAUTHORIZED'
120
                $viewModel->setTemplate('leaders-linked/no-access/index.phtml');
126
                ]);
121
                return $viewModel ;
127
 
122
 
128
            } 
123
            } 
129
 
124
            
130
            $highPerformanceTeamsGroupsMembersMapper = HighPerformanceTeamsGroupsMembersMapper::getInstance($this->adapter);
125
            $highPerformanceTeamsGroupsMembersMapper = HighPerformanceTeamsGroupsMembersMapper::getInstance($this->adapter);
131
            $highPerformanceTeamsGroupsMember = $highPerformanceTeamsGroupsMembersMapper->fetchOneByGroupIdAndUserId($highPerformanceTeamsGroups->id, $currentUser->id);
-
 
132
            if(!$highPerformanceTeamsGroupsMember) {
-
 
133
                return new JsonModel([
126
            $highPerformanceTeamsGroupsMember = $highPerformanceTeamsGroupsMembersMapper->fetchOneByGroupIdAndUserId($highPerformanceTeamsGroups->id, $currentUser->id);
134
                    'success' => false,
127
            if(!$highPerformanceTeamsGroupsMember) {
135
                    'data' => 'ERROR_RECORD_NOT_FOUND'
128
                $viewModel->setTemplate('leaders-linked/no-access/index.phtml');
136
                ]);
129
                return $viewModel ;
137
            }
-
 
138
            if(!($highPerformanceTeamsGroupsMember->status == HighPerformanceTeamsGroupsMembers::STATUS_ACCEPTED || $highPerformanceTeamsGroupsMember->status == HighPerformanceTeamsGroupsMembers::STATUS_ADDED_BY_ADMIN) ){
-
 
139
                return new JsonModel([
130
            }
140
                    'success' => false,
131
            if(!($highPerformanceTeamsGroupsMember->status == HighPerformanceTeamsGroupsMembers::STATUS_ACCEPTED || $highPerformanceTeamsGroupsMember->status == HighPerformanceTeamsGroupsMembers::STATUS_ADDED_BY_ADMIN) ){
141
                    'data' => 'ERROR_YOU_DO_NOT_HAVE_ACCESS'
132
                $viewModel->setTemplate('leaders-linked/no-access/index.phtml');
142
                ]);
133
                return $viewModel ;
143
            }
134
            }
Línea 144... Línea -...
144
            $addTopicBoton=true;
-
 
145
            if($highPerformanceTeamsGroupsMember->type==HighPerformanceTeamsGroupsMembers::TYPE_MODERATOR||$highPerformanceTeamsGroupsMember->type==HighPerformanceTeamsGroupsMembers::TYPE_USER){
-
 
146
                $addTopicBoton=false;
-
 
147
            }
135
            $addTopicBoton=true;
148
           
136
            if($highPerformanceTeamsGroupsMember->type==HighPerformanceTeamsGroupsMembers::TYPE_MODERATOR||$highPerformanceTeamsGroupsMember->type==HighPerformanceTeamsGroupsMembers::TYPE_USER){
149
 
137
                $addTopicBoton=false;
150
                    
138
            }
151
            $this->layout()->setTemplate('layout/layout-backend');
139