Skip to content
Browse files

applying security fixes http://drupal.org/node/1055424 post #123

  • Loading branch information...
1 parent 1040eca commit 9515ee59fe795d3f510b0bc497dd0d3f7d1d0881 @lirantal committed Jun 27, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 og_forum.module
View
10 og_forum.module
@@ -115,7 +115,8 @@ function og_forum_menu() {
'title' => 'Forums',
'page callback' => 'forum_page',
'page arguments' => array(4),
- 'access arguments' => array('access content'),
+ 'access callback' => 'og_forum_access_forum_page',
+ 'access arguments' => array(4),
'type' => MENU_LOCAL_TASK,
'file' => 'forum.pages.inc',
'file path' => drupal_get_path('module', 'forum')
@@ -294,6 +295,13 @@ function og_forum_db_rewrite_sql($query, $primary_table = 'n', $primary_field =
// Rewrite the forum access
return og_forum_get_sql();
}
+ // also check if forums are being accessed via the taxonomy method and apply restrictions
+ elseif (arg(0) == 'taxonomy' && arg(1) == 'term') {
+ return og_forum_get_sql();
+ }
+ elseif (arg(0) == 'node' && arg(2) == 'og' && arg(3) == 'forum') {
+ return og_forum_get_sql();
+ }
}
}

0 comments on commit 9515ee5

Please sign in to comment.
Something went wrong with that request. Please try again.