Fixed issue #789: Now on unresolved objects redirect user to the 404 page.
parent
3afc2fa200
commit
710589d5df
|
@ -80,6 +80,10 @@ class MembershipsController extends mixOf(taiga.Controller, taiga.PageMixin, tai
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadMembers())
|
||||
|
|
|
@ -76,6 +76,10 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
|
||||
openDeleteLightbox: ->
|
||||
|
|
|
@ -76,6 +76,10 @@ class ProjectValuesController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then( => @q.all([
|
||||
@.loadProject(),
|
||||
@.loadValues(),
|
||||
|
|
|
@ -75,6 +75,10 @@ class RolesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fil
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadRoles())
|
||||
|
|
|
@ -168,6 +168,10 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadBacklog())
|
||||
|
|
|
@ -124,6 +124,10 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin, tai
|
|||
@scope.issueId = data.issue
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadIssue())
|
||||
|
|
|
@ -261,6 +261,10 @@ class IssuesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadFilters())
|
||||
|
|
|
@ -146,6 +146,10 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadKanban())
|
||||
|
|
|
@ -30,9 +30,9 @@ class ProjectsController extends taiga.Controller
|
|||
module.controller("ProjectsController", ProjectsController)
|
||||
|
||||
class ProjectController extends taiga.Controller
|
||||
@.$inject = ["$scope", "$tgResources", "$tgRepo", "$routeParams", "$q", "$rootScope", "$appTitle"]
|
||||
@.$inject = ["$scope", "$tgResources", "$tgRepo", "$routeParams", "$q", "$rootScope", "$appTitle", "$tgLocation"]
|
||||
|
||||
constructor: (@scope, @rs, @repo, @params, @q, @rootscope, @appTitle) ->
|
||||
constructor: (@scope, @rs, @repo, @params, @q, @rootscope, @appTitle, @location) ->
|
||||
@.loadInitialData()
|
||||
.then () =>
|
||||
@appTitle.set(@scope.project.name)
|
||||
|
@ -43,6 +43,10 @@ class ProjectController extends taiga.Controller
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise
|
||||
.then(=> @.loadPageData())
|
||||
.then(=> @scope.$emit("project:loaded", @scope.project))
|
||||
|
|
|
@ -96,6 +96,10 @@ class SearchController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
|
||||
|
|
|
@ -43,9 +43,10 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
"$routeParams",
|
||||
"$q",
|
||||
"$appTitle"
|
||||
"$tgLocation"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @appTitle) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @appTitle, @location) ->
|
||||
_.bindAll(@)
|
||||
|
||||
@scope.sprintId = @params.id
|
||||
|
@ -142,6 +143,10 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadTaskboard())
|
||||
|
|
|
@ -118,6 +118,10 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taig
|
|||
@scope.taskId = data.task
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadTask())
|
||||
|
|
|
@ -63,6 +63,10 @@ class UserChangePasswordController extends mixOf(taiga.Controller, taiga.PageMix
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
|
||||
save: ->
|
||||
|
|
|
@ -61,6 +61,10 @@ class UserSettingsController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
|
||||
saveUserProfile: ->
|
||||
|
|
|
@ -68,6 +68,10 @@ class UserNotificationsController extends mixOf(taiga.Controller, taiga.PageMixi
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadNotifyPolicies())
|
||||
|
||||
|
|
|
@ -129,6 +129,10 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin,
|
|||
@scope.usId = data.us
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadUs())
|
||||
|
|
|
@ -102,6 +102,10 @@ class WikiDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taig
|
|||
@scope.projectId = data.project
|
||||
return data
|
||||
|
||||
promise.then null, =>
|
||||
@location.path("/not-found")
|
||||
@location.replace()
|
||||
|
||||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadWikiLinks())
|
||||
|
|
Loading…
Reference in New Issue