Add key in module_app.rb to use instead of title for authorization

This commit is contained in:
Christophe Vilayphiou committed 2012-01-30 18:12:18 +08:00
1 parent 7f999f20ab
commit 762c2f5e8a
4 files changed
+12 -5

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ class ApplicationController < ActionController::Base
before_filter :set_locale, :set_site
def front_end_available(module_app_title='')
app_controller = ModuleApp.first(conditions: {:title => module_app_title} )
app_controller = ModuleApp.first(conditions: {:key => module_app_title} )
unless app_controller.enable_frontend?
render :nothing => true
end