Fixed getting started.

This commit is contained in:
Martin Edenhofer 2016-08-13 00:00:37 +02:00
parent 825df71df1
commit 5586abfbed
4 changed files with 10 additions and 11 deletions

View file

@ -2,7 +2,7 @@ class Index extends App.WizardFullScreen
constructor: ->
super
if !@permissionCheck('admin.wizard')
if @authenticateCheck() && !@permissionCheck('admin.wizard')
@navigate '#'
return
@ -63,7 +63,7 @@ class AutoWizard extends App.WizardFullScreen
super
# if already logged in, got to #
if !@permissionCheck('admin.wizard')
if @authenticateCheck() && !@permissionCheck('admin.wizard')
@navigate '#'
return
@ -139,7 +139,7 @@ class Admin extends App.WizardFullScreen
constructor: ->
super
if !@permissionCheck('admin.wizard')
if @authenticateCheck() && !@permissionCheck('admin.wizard')
@navigate '#'
return

View file

@ -72,7 +72,7 @@ class App.Auth
# empty session
App.Session.init()
# update model definition
# update model definition (needed for not authenticated areas like wizard)
if data.models
for model, attributes of data.models
for attribute in attributes

View file

@ -192,16 +192,15 @@ class App.Model extends Spine.Model
# in case if no configure_attributes exist
return {} if !attributes
attributesNew = {}
# check params of screen if screen is requested
attributesNew = {}
if screen
for attribute in attributes
if attribute.screen
if attribute && attribute.screen && attribute.screen[ screen ] && !_.isEmpty(attribute.screen[ screen ])
for item, value of attribute.screen[ screen ]
attribute[item] = value
attributesNew[ attribute.name ] = attribute
if attribute && attribute.screen && attribute.screen[ screen ] && !_.isEmpty(attribute.screen[ screen ])
for item, value of attribute.screen[ screen ]
attribute[item] = value
attributesNew[ attribute.name ] = attribute
# if no screen is given or no attribute has this screen - use default attributes
if !screen || _.isEmpty(attributesNew)

View file

@ -775,7 +775,7 @@ returns
role_ids.each { |role_id|
role = Role.lookup(id: role_id)
raise "Unable to find role for id #{role_id}" if !role
next unless role.preferences[:not]
next if !role.preferences[:not]
role.preferences[:not].each { |local_role_name|
local_role = Role.lookup(name: local_role_name)
next if !local_role