Fixed getting started.
This commit is contained in:
parent
825df71df1
commit
5586abfbed
4 changed files with 10 additions and 11 deletions
|
@ -2,7 +2,7 @@ class Index extends App.WizardFullScreen
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
||||||
if !@permissionCheck('admin.wizard')
|
if @authenticateCheck() && !@permissionCheck('admin.wizard')
|
||||||
@navigate '#'
|
@navigate '#'
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class AutoWizard extends App.WizardFullScreen
|
||||||
super
|
super
|
||||||
|
|
||||||
# if already logged in, got to #
|
# if already logged in, got to #
|
||||||
if !@permissionCheck('admin.wizard')
|
if @authenticateCheck() && !@permissionCheck('admin.wizard')
|
||||||
@navigate '#'
|
@navigate '#'
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ class Admin extends App.WizardFullScreen
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
||||||
if !@permissionCheck('admin.wizard')
|
if @authenticateCheck() && !@permissionCheck('admin.wizard')
|
||||||
@navigate '#'
|
@navigate '#'
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ class App.Auth
|
||||||
# empty session
|
# empty session
|
||||||
App.Session.init()
|
App.Session.init()
|
||||||
|
|
||||||
# update model definition
|
# update model definition (needed for not authenticated areas like wizard)
|
||||||
if data.models
|
if data.models
|
||||||
for model, attributes of data.models
|
for model, attributes of data.models
|
||||||
for attribute in attributes
|
for attribute in attributes
|
||||||
|
|
|
@ -192,16 +192,15 @@ class App.Model extends Spine.Model
|
||||||
|
|
||||||
# in case if no configure_attributes exist
|
# in case if no configure_attributes exist
|
||||||
return {} if !attributes
|
return {} if !attributes
|
||||||
attributesNew = {}
|
|
||||||
|
|
||||||
# check params of screen if screen is requested
|
# check params of screen if screen is requested
|
||||||
|
attributesNew = {}
|
||||||
if screen
|
if screen
|
||||||
for attribute in attributes
|
for attribute in attributes
|
||||||
if attribute.screen
|
if attribute && attribute.screen && attribute.screen[ screen ] && !_.isEmpty(attribute.screen[ screen ])
|
||||||
if attribute && attribute.screen && attribute.screen[ screen ] && !_.isEmpty(attribute.screen[ screen ])
|
for item, value of attribute.screen[ screen ]
|
||||||
for item, value of attribute.screen[ screen ]
|
attribute[item] = value
|
||||||
attribute[item] = value
|
attributesNew[ attribute.name ] = attribute
|
||||||
attributesNew[ attribute.name ] = attribute
|
|
||||||
|
|
||||||
# if no screen is given or no attribute has this screen - use default attributes
|
# if no screen is given or no attribute has this screen - use default attributes
|
||||||
if !screen || _.isEmpty(attributesNew)
|
if !screen || _.isEmpty(attributesNew)
|
||||||
|
|
|
@ -775,7 +775,7 @@ returns
|
||||||
role_ids.each { |role_id|
|
role_ids.each { |role_id|
|
||||||
role = Role.lookup(id: role_id)
|
role = Role.lookup(id: role_id)
|
||||||
raise "Unable to find role for id #{role_id}" if !role
|
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|
|
role.preferences[:not].each { |local_role_name|
|
||||||
local_role = Role.lookup(name: local_role_name)
|
local_role = Role.lookup(name: local_role_name)
|
||||||
next if !local_role
|
next if !local_role
|
||||||
|
|
Loading…
Reference in a new issue