Created
March 13, 2015 14:55
-
-
Save VladimirPal/dc66fc85c29e294c39f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = class MainController extends Marionette.Object | |
queuMethod: false | |
initialize: -> | |
App.vent.on 'profile:ready', () => | |
if @queuMethod | |
@[@queuMethod](@queuArgs) | |
@queuMethod = false | |
dashboard: -> | |
roles = App.request('data:profile').get('roles') | |
if roles? | |
if "admin" in roles | |
@dashboardAdmin() | |
else | |
@dashboardClient() | |
else | |
@queuMethod = 'dashboard' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment