             controller: 'ScanSingleObjectCtrl as scanSingleObject'
             params:
                 scanInputValue: ''
+            onEnter: permissionDeniedCheck
 
         .state  'listPersons',
             url: '/list/persons'

        # For any unmatched url, redirect to /
        $urlRouterProvider.otherwise '/'

        # Set up the states
        $stateProvider
        .state 'home',

            url: '/import'
            templateUrl: 'static/templates/import.html'
            controller: 'ImportCtrl as import'
            onEnter: permissionDeniedCheck

        .state  'database',
            url: '/database'
            templateUrl: 'static/templates/database.html'
            controller: 'DatabaseCtrl as database'
            onEnter: permissionDeniedCheck

        return
]
