Added permission check for redirect after create.
This commit is contained in:
parent
d4068d9359
commit
48a2996f45
1 changed files with 9 additions and 1 deletions
|
@ -313,7 +313,15 @@ class App.TicketCreate extends App.Controller
|
|||
# scroll to top
|
||||
ui.scrollTo()
|
||||
|
||||
ui.navigate "#ticket/zoom/#{@id}"
|
||||
# access to group
|
||||
session = App.Session.all()
|
||||
if session && session['group_ids'] && _.contains(session['group_ids'], @group_id)
|
||||
ui.navigate "#ticket/zoom/#{@id}"
|
||||
return
|
||||
|
||||
# if not, show start screen
|
||||
ui.navigate "#"
|
||||
|
||||
|
||||
error: ->
|
||||
ui.log 'save failed!'
|
||||
|
|
Loading…
Reference in a new issue