Avoid navigation on blocked projects
parent
e89cf91654
commit
6232555a75
|
@ -780,7 +780,8 @@ i18nInit = (lang, $translate) ->
|
||||||
|
|
||||||
|
|
||||||
init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $navUrls, appMetaService,
|
init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $navUrls, appMetaService,
|
||||||
loaderService, navigationBarService, errorHandlingService, lightboxService, $tgConfig) ->
|
loaderService, navigationBarService, errorHandlingService, lightboxService, $tgConfig,
|
||||||
|
projectService) ->
|
||||||
$log.debug("Initialize application")
|
$log.debug("Initialize application")
|
||||||
|
|
||||||
$rootscope.$on '$translatePartialLoaderStructureChanged', () ->
|
$rootscope.$on '$translatePartialLoaderStructureChanged', () ->
|
||||||
|
@ -869,6 +870,9 @@ init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $na
|
||||||
$rootscope.$on '$locationChangeStart', (event) ->
|
$rootscope.$on '$locationChangeStart', (event) ->
|
||||||
errorHandlingService.init()
|
errorHandlingService.init()
|
||||||
|
|
||||||
|
if projectService.project?.get('blocked_code')
|
||||||
|
errorHandlingService.block()
|
||||||
|
|
||||||
if lightboxService.getLightboxOpen().length
|
if lightboxService.getLightboxOpen().length
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
@ -1001,5 +1005,6 @@ module.run([
|
||||||
"tgErrorHandlingService",
|
"tgErrorHandlingService",
|
||||||
"lightboxService",
|
"lightboxService",
|
||||||
"$tgConfig",
|
"$tgConfig",
|
||||||
|
"tgProjectService",
|
||||||
init
|
init
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue