Project

General

Profile

Actions

Feature #17024

closed

request for configurability of pagetree view in web->page module

Added by Steffen Stein over 17 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-02-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

Add support for configuration of which pages are shown in the page tree of the web->page module, i.e. only show editable pages.

Patch suggests to put configuration information into the global config array. It's probably a good idea to move this to tsconfig to enable configuration on a per user-basis.

Configuration could be made more user friendly than just supplying integer indicating access-right-configuration
(issue imported from #M5049)


Files

alt_db_navframe.php.diff (482 Bytes) alt_db_navframe.php.diff Administrator Admin, 2007-02-21 18:58
alt_db_navframe.php.userTS.diff (505 Bytes) alt_db_navframe.php.userTS.diff Administrator Admin, 2007-02-22 08:47
typo3-restrictTree.diff (597 Bytes) typo3-restrictTree.diff Administrator Admin, 2009-11-12 16:18
typo3-restrictTree.diff (966 Bytes) typo3-restrictTree.diff Kai Habermann, 2011-10-26 14:05
Actions #1

Updated by Steffen Stein over 17 years ago

second patch uses userTS to configure which pages are shown.

Actions #2

Updated by Patrick Gaumond over 17 years ago

This is a must-have option needed in real-life situation. I never understood the "limitation" anyway.

Actions #3

Updated by Thomas Hempel over 17 years ago

Hi,

for what version of TYPO3 should this patch be? The patch isn't suitable for 4.1.

Greets,
Thomas

Actions #4

Updated by Steffen Stein over 17 years ago

Patch was for 4.0. Code has moved in 4.1

it's now in class.webpagetree.php (same folder)

"patch" below (constructor function -- old content "$this->init()" commented out, new running code within function :) Uses TSConfig

function webPageTree() {
//$this->init();
if ($GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.restrictTree')) {
$restriction = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.restrictTree');
$this->init(' AND '.$GLOBALS['BE_USER']->getPagePermsClause($restriction));
} else {
$this->init();
}
}

Actions #5

Updated by Steffen Stein over 16 years ago

ping!

any news on this one?

Actions #6

Updated by Steffen Stein over 16 years ago

Can I do anything to speed up integration into the 4.1 and 4.2 code base? -> new patch against 4.1.7 or the like?

Actions #7

Updated by Patrick Gaumond about 16 years ago

Fixed with the new feature of http://bugs.typo3.org/view.php?id=9109 !

Actions #8

Updated by Steffen Stein over 15 years ago

I don't see how.

This request focuses on displaying only e.g. editable pages in a given mount in the pagetree view. This is opposed to showing all pages that may be viewed by the current user (current behavior)

If I understand correctly Bug 9109 adds typoscript configuration of additional mounts in page and file tree.

Am I correct? If so -- what can I do to get the patch in the 4.1 (relevant to us) and 4.2 code base?

Actions #9

Updated by Steffen Stein over 15 years ago

Also, it doesn't apply to 4.1 (which we are stuck to since RHEL does not support PHP 5)

Actions #10

Updated by Jonas Diemer about 15 years ago

I have added a new patch typo3-restrictTree.diff against typo3 4.2.10 (and probably any earlier).

How it works: This patch adds a new TS option for BE Users "options.pageTree.restrictTree", which pages are shown in the page tree based on the users privileges.

The possible values of the option are based on getPagePermsClause():

/** * Returns a WHERE-clause for the pages-table where user permissions according to input argument, $perms, is validated. * $perms is the "mask" used to select. Fx. if $perms is 1 then you'll get all pages that a user can actually see! * 2^0 = show (1) * 2^1 = edit (2) * 2^2 = delete (4) * 2^3 = new (8) * If the user is 'admin' " 1=1" is returned (no effect)

Hence:

--- TS start ---
options.pageTree.restrictTree=2
--- TS end ---

only shows pages that are editable by the user. This helps clean up the page_tree for the users.

options.pageTree.restrictTree=1 is the default behavior (show pages that user may see).

Can someone please add this to the mainline typo3 source so it appears in later versions? Thanks.

Actions #11

Updated by Steffen Stein over 14 years ago

What keeps this patch from being integrated into the typo3 source?

We are more than happy to provide additional information where necessary. Please advise if this is necessary

Thanks.

Actions #12

Updated by Kai Habermann about 13 years ago

Here is a diff based on TYPO3 4.5.7. It uses the function getWhereClause() in class.t3lib_tree_pagetree_dataprovider.php in the folder /t3lib/tree/pagetree/ to insert the $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.restrictTree').

Please keep in mind: this only restricts the page tree display using the Web-Module. When moving a page with Page->Move page / Move element, the page tree listing is not restricted and all pages are displayed, which might confuse some editors.

Greetings
Kai

Actions #13

Updated by Alexander Opitz almost 10 years ago

  • Description updated (diff)
  • Status changed from Accepted to Needs Feedback
  • Target version deleted (0)

Hi,

what is the state of this issue?

Actions #14

Updated by Alexander Opitz over 9 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Thomas Hempel)

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF