Pārlūkot izejas kodu

admin redirect to hosts if has permission

develop
Robin Thoni 8 gadus atpakaļ
vecāks
revīzija
fed8b60ff5
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4
    1
      admin/controllers/home.controller.js

+ 4
- 1
admin/controllers/home.controller.js Parādīt failu

@@ -2,7 +2,10 @@ angular.module('camotionAdmin')
2 2
     .controller('HomeController', ['$scope', '$state', 'luticateAuthCache',
3 3
         function($scope, $state, luticateAuthCache) {
4 4
 
5
-            if (luticateAuthCache.hasEffectivePermission("CAMOTION_CAMERA_GET")) {
5
+            if (luticateAuthCache.hasEffectivePermission("CAMOTION_HOST_GET")) {
6
+                $state.go('hosts');
7
+            }
8
+            else if (luticateAuthCache.hasEffectivePermission("CAMOTION_CAMERA_GET")) {
6 9
                 $state.go('cameras');
7 10
             }
8 11
             else if (luticateAuthCache.hasEffectivePermission("CAMOTION_SENSOR_GET")) {

Notiek ielāde…
Atcelt
Saglabāt