Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 17274 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 17274 Rev 17275
Línea 180... Línea 180...
180
            $request    = $this->getRequest();
180
            $request    = $this->getRequest();
Línea 181... Línea 181...
181
    
181
    
182
            $currentUserPlugin = $this->plugin('currentUserPlugin');
182
            $currentUserPlugin = $this->plugin('currentUserPlugin');
Línea 183... Línea -...
183
            $currentUser = $currentUserPlugin->getUser();
-
 
184
    
-
 
185
            if(!$currentUser->is_admin) {
-
 
186
                return new JsonModel([
-
 
187
                    'success' => false,
-
 
188
                    'data' => 'ERROR_NOT_AUTHORIZED'
-
 
189
                ]);
-
 
190
            }
183
            $currentUser = $currentUserPlugin->getUser();
191
    
184
    
192
            if (!$request->isPost()) {
185
            if (!$request->isPost()) {
193
                return new JsonModel([
186
                return new JsonModel([
194
                    'success' => false,
187
                    'success' => false,
Línea 325... Línea 318...
325
            $currentUserPlugin = $this->plugin('currentUserPlugin');
318
            $currentUserPlugin = $this->plugin('currentUserPlugin');
326
            $currentUser = $currentUserPlugin->getUser();
319
            $currentUser = $currentUserPlugin->getUser();
Línea 327... Línea 320...
327
 
320
 
Línea 328... Línea -...
328
            $id = $this->params()->fromRoute('id');
-
 
329
 
-
 
330
            if(!$currentUser->is_admin) {
-
 
331
                return new JsonModel([
-
 
332
                    'success' => false,
-
 
333
                    'data' => 'ERROR_NOT_AUTHORIZED'
-
 
334
                ]);
-
 
335
            }
321
            $id = $this->params()->fromRoute('id');
336
 
322
 
337
            if (!$request->isPost()) {
323
            if (!$request->isPost()) {
338
                return new JsonModel([
324
                return new JsonModel([
339
                    'success' => false,
325
                    'success' => false,
Línea 394... Línea 380...
394
            $currentUserPlugin = $this->plugin('currentUserPlugin');
380
            $currentUserPlugin = $this->plugin('currentUserPlugin');
395
            $currentUser = $currentUserPlugin->getUser();
381
            $currentUser = $currentUserPlugin->getUser();
Línea 396... Línea 382...
396
 
382
 
Línea 397... Línea -...
397
            $id = $this->params()->fromRoute('id');
-
 
398
 
-
 
399
            if(!$currentUser->is_admin) {
-
 
400
                return new JsonModel([
-
 
401
                    'success' => false,
-
 
402
                    'data' => 'ERROR_NOT_AUTHORIZED'
-
 
403
                ]);
-
 
404
            }
383
            $id = $this->params()->fromRoute('id');
405
 
384
 
406
            if (!$request->isPost() && !$request->isGet()) {
385
            if (!$request->isPost() && !$request->isGet()) {
407
                return new JsonModel([
386
                return new JsonModel([
408
                    'success' => false,
387
                    'success' => false,