[TYPO3-dev] Configuration feature in web->page pagetree

Steffen Stein stein at ida.ing.tu-bs.de
Wed Feb 21 18:30:31 CET 2007


Dear group,

I am working on the following problem:

I want backend users to be only able to see pages that they may edit in
the web->page module pagetree.
Still, I want them to "see" a lot more pages when trying to generate a
link using the RTE.

The browsable_tree class has support for limiting the displayed pages to
those that are editable to the user.
I propose to introduce a configuration feature into alt_db_navframe.php
allowing to limit the pages shown in the tree not only to visible pages,
but to arbitrary access configurations (such as editable in my case).

I hereby submit a patch for discussion - configuration options can of
course be rendered more user-friendly than supplying the integer-code of
the desired access-right-pattern.

Patch follows below

affected file: typo3/alt_db_navframe.php

--- alt_db_navframe.php	2007-02-21 18:15:29.000000000 +0100
+++ alt_db_navframe_new.php	2007-02-21 17:48:46.000000000 +0100
@@ -86,7 +86,12 @@
 	 * @return	void
 	 */
 	function localPageTree() {
-		$this->init();
+		if ($GLOBALS['TYPO3_CONF_VARS']['BE']['restrictWebPageTree']) {
+			$restriction=$GLOBALS['TYPO3_CONF_VARS']['BE']['restrictWebPageTree']
+			$this->init(' AND
'.$GLOBALS['BE-USER']->->getPagePermsClause($restriction))
+		} else {
+			$this->init();
+		}
 	}

 	/**




More information about the TYPO3-dev mailing list