Upgrading meedan_discussion_permissions code to Drupal 7.