# HG changeset patch # User Dan # Date 1192679062 14400 # Node ID c312109501189f678991c27586b7cabbb1602ff4 # Parent 88b85b9b9272d5b4b79aa5c50e0f9480a2362d1e Some access controls implemented... we'll see how well this works diff -r 88b85b9b9272 -r c31210950118 decir/viewforum.php --- a/decir/viewforum.php Wed Oct 17 23:17:09 2007 -0400 +++ b/decir/viewforum.php Wed Oct 17 23:44:22 2007 -0400 @@ -79,9 +79,8 @@ $num_replies = 0; if ( $last_row['topic_deleted'] == 1 ) { - $thread_link = ''; - // FIXME: This will be controlled by an ACL rule - if ( $session->user_level >= USER_LEVEL_MOD ) + $thread_link = '<Deleted>'; + if ( $session->get_permissions('decir_see_deleted_topic_full') ) { $thread_link = '' . $last_row['topic_title'] . ''; } diff -r 88b85b9b9272 -r c31210950118 decir/viewtopic.php --- a/decir/viewtopic.php Wed Oct 17 23:17:09 2007 -0400 +++ b/decir/viewtopic.php Wed Oct 17 23:44:22 2007 -0400 @@ -72,7 +72,7 @@ $topic_id = $row['topic_id']; $topic_exists = true; // FIXME: This will be controlled by an ACL rule - if ( $row['topic_deleted'] == 1 && $session->user_level < USER_LEVEL_MOD ) + if ( $row['topic_deleted'] == 1 && !$session->get_permissions('decir_see_deleted_topic_full') ) { $topic_exists = false; } diff -r 88b85b9b9272 -r c31210950118 plugins/Decir.php --- a/plugins/Decir.php Wed Oct 17 23:17:09 2007 -0400 +++ b/plugins/Decir.php Wed Oct 17 23:44:22 2007 -0400 @@ -59,7 +59,7 @@ $session->register_acl_type('decir_see_deleted_post', AUTH_ALLOW, 'See placeholders for deleted posts', Array('read'), 'Special|DecirPost|DecirTopic|DecirForum'); $session->register_acl_type('decir_see_deleted_post_full', AUTH_DISALLOW, 'Read the full contents of deleted posts', Array('decir_see_deleted_post'), 'Special|DecirPost|DecirTopic|DecirForum'); $session->register_acl_type('decir_see_deleted_topic', AUTH_ALLOW, 'See placeholders for deleted topics', Array('read'), 'DecirTopic|DecirForum'); - $session->register_acl_type('decir_see_deleted_topic_full', AUTH_DISALLOW, 'Read the full contents of deleted topics', Array('decir_see_deleted_topic'), 'DecirTopic|DecirForum'); + $session->register_acl_type('decir_see_deleted_topic_full', AUTH_DISALLOW, 'Read the full contents of deleted topics', Array('decir_see_deleted_topic'), 'Special|DecirTopic|DecirForum'); } function page_Special_Forum()