Project

General

Profile

Actions

Bug #16236

closed

permissions of versioned pages are not changed in draft workspace

Added by Andreas Wolf almost 18 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Category:
Workspaces
Target version:
-
Start date:
2006-06-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When you change the access permissions of a page in a draft-workspace and apply the changes recursively, the changes are not applied to subpages which already have a new version in this workspace. The permissions are not changed with the original versions either.

I located a bug in typo3/mod/web/perm/index.php (class SC_mod_web_perm_index), function getRecursiveSelect. This function creates the select-box for choosing if and how many levels the permissions should be set recursively.
The problem is that this function always uses the id of the live-record as supplied by t3lib_treeview::getTree. This function returns an array of pages, each with some fields from the page-record. One of the supplied fields is _ORIG_uid, which is the id of the workspace-record with versionized pages.

To fix the bug, I extended the function t3lib_treeview::getTree to add a attribute orig_ids_hierarchy to the current instance of the object. Normally ids_hierarchy is used, but this contains only the uids of the life-records.
The new attribute is used instead of ids_hierarchy in SC_mod_web_perm_index::getRecursiveSelect, so this function now respects the versionized pages when creating the select-box.

(issue imported from #M3666)


Files

3666_new.patch (1.58 KB) 3666_new.patch Administrator Admin, 2006-06-15 20:14
bug_3666.diff (2.33 KB) bug_3666.diff Administrator Admin, 2006-11-17 21:03

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Feature #16043: may not set access rights recursively in draft/custom workspacesClosedMartin Kutschker2006-04-13

Actions
Actions #1

Updated by Andreas Wolf almost 18 years ago

I have just refined the patchfile a bit to make patching easier. Please use 3666_new.patch instead of 3666.patch. (Could one of the admins please delete the old file?)

Actions #2

Updated by Andreas Wolf over 17 years ago

Another thing about the patch: The line

if ($GLOBALS['BE_USER']->user['uid'] && count($tree->ids_hierarchy)) {

in typo3/mod/web/perm/index.php

should be also changed to

if ($GLOBALS['BE_USER']->user['uid'] && count($tree->orig_ids_hierarchy)) {

Actions #3

Updated by Andreas Wolf about 17 years ago

Is there any chance to get this fixed in 4.1?

Actions #4

Updated by Martin Kutschker about 17 years ago

With this patch only the pages with versions in the current workspace are affect (but no pages in the LIVE workspace).

Was this intended?

Actions #5

Updated by Andreas Wolf about 17 years ago

Yes, that's a problem I couldn't solve. Normally I would say to only respect and change the permissions of the live-version, but that would require (massive) changes in the core. Additionally, this would have to be tested thoroughly.

Actions #6

Updated by Martin Kutschker about 17 years ago

But this behaviour is odd as well. I tried to change permissions on a folder with 5 subpages where only one page had a draft version. I expected 6 pages with changed permissions in my WS, but in fact only one was changed, which is odd.

Maybe it makes sense to honour the "allow live changes" flag of the WS. If not set, the patch behaviour is right (change only drafts in a WS). But if set, the permissions should be changed for all pages (live and WS).

Anyway, while I'm not sure if this is the best solutions of all, it's an improvement.

Actions #7

Updated by Martin Kutschker about 17 years ago

Fixed in SVN (4.1RC3, 4.0.6)

Actions #8

Updated by Michael Stucki over 10 years ago

  • Category changed from Miscellaneous to Workspaces
Actions #9

Updated by Michael Stucki over 10 years ago

  • Project changed from 624 to TYPO3 Core
  • Category changed from Workspaces to Workspaces
  • Target version deleted (0)
Actions

Also available in: Atom PDF