Apply app_auth to ad_banner. From now,ad_banner can only be viewed for at least manager.

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-05-04 15:40:43 +08:00
1 parent f427c3803f
commit bff3cefbc7
4 files changed
+20 -8

No files matched your search

+9
View File
@@ -74,6 +74,15 @@ module ApplicationHelper
end
end
def active_sys_call_for_app(controller_name,action_name,app_title)
unless active_for_action(controller_name,action_name).nil?
app = ModuleApp.find params[:id]
app.title == app_title ? 'active' : nil
else
nil
end
end
def active_for_controllers(*controller_names)
(controller_names.include?(controller.controller_name) || controller_names.include?(request.fullpath)) ? 'active' : nil
end