Bug #25135

Pagetree - Drag and drop only works for BE-Users with delete-permissions

Added by Torben Hansen over 8 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Pagetree
Target version:
Start date:
2011-02-22
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
5.2
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

All drag and drop functions with pages in the pagetree only works, when the backend-user has assigned delete-permissions to pages in the access-module.

How to reproduce:

1. Create some pages in the pagetree
2. Create a BE usergroup
3. Create a BE user
4. Assign the BE user to the BE usergroup
5. Assign BE usergroup access permissions to all pages (with default setting - "Delete page" not checked!)
6. Switch user to BE user
7. Try to use drap and drop in pagetree

It´s hard to say for me if this is a bug or a feature. In TYPO3 4.4.x, a BE user could use drag and drop in the pagetree without delete-permissions on pages.

If this is not a bug, maybe it would be a good idea to set "Delete page" checked in TYPO3´s default settings in the access-module.

(issue imported from #M17711)


Related issues

Related to TYPO3 Core - Bug #29801: Delete access required to move pages. Closed 2011-09-15
Related to TYPO3 Core - Bug #25433: Pagetree drag and drop - should be disabled when user can not edit "pages" Accepted 2011-03-29
Related to TYPO3 Core - Bug #83694: Do not show delete option when user has no delete permissions New 2018-01-26
Related to TYPO3 Core - Bug #84513: Pagetree - Drag and Drop does not work without delete-permissions Closed 2018-03-21
Duplicated by TYPO3 Core - Bug #28778: Pages not moveable in pagetree without right to delete page Closed 2011-08-05

Associated revisions

Revision 7cd09eb3 (diff)
Added by Tymoteusz Motylewski over 1 year ago

[BUGFIX] Allow users without delete permissions to drag pages in page tree

BE users without delete rights can now drag-drop pages in the page tree.
The drag - delete area is not shown.

Resolves: #25135
Releases: 8.7, 7.6
Change-Id: Icc82675a783f19ae72b6d00ac2809ad76b93dd67
Reviewed-on: https://review.typo3.org/54965
Tested-by: TYPO3com <>
Tested-by: Joerg Kummer <>
Reviewed-by: Timo Pfeffer <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

Revision 374c3e96 (diff)
Added by Tymoteusz Motylewski over 1 year ago

[BUGFIX] Allow users without delete permissions to drag pages in page tree

BE users without delete rights can now drag-drop pages in the page tree.
The drag - delete area is not shown.

Resolves: #25135
Releases: 8.7, 7.6
Change-Id: Icc82675a783f19ae72b6d00ac2809ad76b93dd67
Reviewed-on: https://review.typo3.org/55535
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

History

#1 Updated by Stefan Galinski over 8 years ago

There was a reason for this behaviour. Unfortunatly I don't know it anymore... ;-)

#2 Updated by Torben Hansen over 8 years ago

Nice one ;-)

I had a look at the code and found the function, which disables the drag and drop feature. In "class.t3lib_tree_pagetree_commands.php" the function "getNewNode" is responsible for the setting. At the end of the function you´ll see the following:

if (!$subNode->canBeEdited() || !$subNode->canBeRemoved() || intval($record['t3ver_state']) === 2) {
$subNode->setDraggable(FALSE);
}

I have tried to remove "!$subNode->canBeRemoved()" and now all drag and drop functions seem to work fine for a BE usergroup. So the question is, why is it necessary that a page can be removed to use drap and drop functionality? My first thought was the new "Drop here to delete"-field. Maybe no access-checking is done there. So I tested to drag and drop a page (with no delete-permission for the usergroup) to the "Drop here to delete"-field, and an error message appears which says, that I don´t have the right permissions to delete the page. So everything fine there and access-checking is correct.

Maybe this helps you remembering, what the reason was for this behaviour.

#3 Updated by Susanne Moog about 8 years ago

  • Category set to Pagetree
  • Target version deleted (0)

#4 Updated by Andreas Wolf almost 8 years ago

  • Assignee set to Stefan Galinski
  • Target version set to 4.6.0-beta3

Stefan, any news on that? Does Torbens comment help you fix this issue?

#5 Updated by Oliver Hader almost 8 years ago

  • Target version changed from 4.6.0-beta3 to 4.6.0-RC1

#6 Updated by Xavier Perseguers almost 8 years ago

  • Target version changed from 4.6.0-RC1 to 4.6.0

#7 Updated by Chris topher over 7 years ago

  • Target version changed from 4.6.0 to 4.6.1

#8 Updated by Chris topher over 7 years ago

  • Target version changed from 4.6.1 to 4.6.2

#9 Updated by Xavier Perseguers over 7 years ago

  • Assignee deleted (Stefan Galinski)
  • Target version deleted (4.6.2)

#10 Updated by Stephan Vidar over 7 years ago

Same problem in TYPO3 4.5.11

#11 Updated by Falk Kühnel over 6 years ago

Still a problem in 4.7.6

#12 Updated by Robert Vock over 5 years ago

push

Still a problem in 6.1.
I can't see a reason why the editor needs the delete permission to move pages. It's possible to move the page in list view, so it should be possible to move in the pagetree.

#13 Updated by Mathias Brodala over 4 years ago

  • Target version set to next-patchlevel

Still valid with 6.2 LTS, please have a look at this.

#14 Updated by Mathias Schreiber over 4 years ago

  • Status changed from New to Accepted
  • TYPO3 Version changed from 4.5 to 7
  • Is Regression set to No

#15 Updated by Mathias Schreiber over 3 years ago

  • Target version deleted (next-patchlevel)

#16 Updated by Gerrit Code Review over 3 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46445

#17 Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46445

#18 Updated by Johannes C. Schulz about 3 years ago

I run into that problem using 7.6.6.
I hope this problem will be fixed soon?!

best regards
Johannes

#19 Updated by Sebastian Michaelsen over 2 years ago

Bump. Ran into this with 7.6.11

#20 Updated by Markus Klein over 2 years ago

  • Status changed from Under Review to Accepted
  • TYPO3 Version changed from 7 to 6.2
  • Complexity set to hard

#21 Updated by Stig Nørgaard Færch over 1 year ago

  • TYPO3 Version changed from 6.2 to 8

Bump. Now ran into this in 8.7.8.

#22 Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54965

#23 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54965

#24 Updated by Tymoteusz Motylewski over 1 year ago

  • Related to Bug #83694: Do not show delete option when user has no delete permissions added

#25 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54965

#26 Updated by Susanne Moog over 1 year ago

  • Target version set to 8.7.10

#27 Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55535

#28 Updated by Tymoteusz Motylewski over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#29 Updated by Robert Vock over 1 year ago

  • Related to Bug #84513: Pagetree - Drag and Drop does not work without delete-permissions added

#30 Updated by Helmut Hummel about 1 year ago

There was a reason for this behaviour.

The reason obviously is, that data handler disallows moving pages without delete access and (imho) rightfully does so. See followup https://forge.typo3.org/issues/84513#note-3

#31 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF