|
|
|
@ -68,6 +68,10 @@ module ApplicationHelper
|
|
|
|
|
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller] || params[:controller], options[:action])
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def link_to_if_authorized_course(name, options = {}, html_options = nil, *parameters_for_method_reference)
|
|
|
|
|
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for_course(options[:controller] || params[:controller], options[:action])
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def link_to_if_authorized_contest(name, options = {}, html_options = nil, *parameters_for_method_reference)
|
|
|
|
|
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for_contest(options[:controller] || params[:controller], options[:action])
|
|
|
|
|
end
|
|
|
|
|