Skip to content

Commit

Permalink
Fixed bug with users that don't have correct permission
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Mar 15, 2010
1 parent e7f7e30 commit 8fa0735
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/structure_controller.rb
Expand Up @@ -50,6 +50,7 @@ def index
end

@wizard_list = get_handlers(:structure,:wizard) if myself.has_role?('editor_structure_advanced')
@wizard_list ||= []

cms_page_info 'Website', 'website',myself.has_role?('editor_structure_advanced') ? 'CMSStructure.popup();' : nil
render :action => 'view', :layout => "manage"
Expand All @@ -60,6 +61,7 @@ def wizards
cms_page_path ['Website'], "Wizards"

@wizard_list = get_handler_info(:structure,:wizard) if myself.has_role?('editor_structure_advanced')
@wizard_list ||= []
@wizard_list = @wizard_list.select { |info| myself.has_role?(info[:permit]) }

end
Expand Down

0 comments on commit 8fa0735

Please sign in to comment.