CIRANDAS/noosfero-ecosol — pull request #16 by caioformiga (2013-05-24 16:06:15+00:00)
Title: Fixing role_assignment_sweeper due to distribution plugin hotspot

Fixing role_assignment_sweeper code for expire blocks, validating if there are blocks to expire before handler to SweeperHelper.rb:expire_profile_blocks(blocks)

This issue was found due to distribution plugin hotspot 'control_panel_button' has inappropriate behavior (uses DistributionPluginNode.find_or_create to activate Distribution on a Community before it has in fact decide to become a distributor). In this case all community members are setted do 'consumer' role.

To test: create a community -> access its control panel, if fixing is working it shouldn't crash, if not it should navigate to 'Temporary System Fail' page.