Dependencies update and use adapter's url_name instaid of the given name for index lookup for consistent url and index path locations
This commit is contained in:
@@ -8,8 +8,8 @@ module Dunlop
|
||||
def ember_path
|
||||
app_globals = {}
|
||||
if adapter_name = params[:adapter].to_s.scan(/\w+/).first.presence
|
||||
app_index = Rails.root.join("public/adapters/#{adapter_name}/app/index.html")
|
||||
return render text: 'unauthorized, no adapter engine', status: 403 unless adapter = Panda.adapters[adapter_name]
|
||||
app_index = Rails.root.join("public/adapters/#{adapter.url_name}/app/index.html")
|
||||
#app_globals = adapter.settings # load through request instead. More stable then changing environments
|
||||
unless Rails.application.config.try(:loose_ember_app_authorization)
|
||||
return render text: 'unauthorized, no adapter engine', status: 403 unless current_user.admin? or authorize!(:read, adapter.engine)
|
||||
|
||||
Reference in New Issue
Block a user