Add page about insufficient oauth permissions

This commit is contained in:
Piotr Sarnacki 2013-10-25 13:10:22 +02:00
parent 6a9510413d
commit 796e830a36
2 changed files with 14 additions and 1 deletions

View File

@ -99,6 +99,7 @@ Travis.Router.map ->
@route 'getting_started'
@route 'first_sync'
@route 'insufficient_oauth_permissions'
@route 'stats', path: '/stats'
@route 'auth', path: '/auth'
@route 'notFound', path: '/not-found'
@ -138,7 +139,7 @@ Travis.GettingStartedRoute = Ember.Route.extend
@render 'repos', outlet: 'left'
@_super.apply(this, arguments)
Travis.FirstSyncRoute = Ember.Route.extend
Travis.SimpleLayoutRoute = Ember.Route.extend
setupController: ->
$('body').attr('id', 'home')
@container.lookup('controller:repos').activate()
@ -149,6 +150,13 @@ Travis.FirstSyncRoute = Ember.Route.extend
@render 'top', outlet: 'top'
@_super.apply(this, arguments)
Travis.FirstSyncRoute = Travis.SimpleLayoutRoute.extend()
Travis.InsufficientOauthPermissionsRoute = Travis.SimpleLayoutRoute.extend
setupController: (controller) ->
@_super.apply this, arguments
existingUser = document.location.hash.match(/#existing[_-]user/)
controller.set('existingUser', existingUser)
Travis.IndexCurrentRoute = Ember.Route.extend Travis.SetupLastBuild,
renderTemplate: ->
@render 'repo'

View File

@ -0,0 +1,5 @@
<p>We need more permissions to allow you to use Travis.</p>
{{#if existingUser}}
<p> This will be shown if #existing-user is added to the url</p>
{{/if}}