Project

General

Profile

Actions

Bug #47144

closed

Editor can always edit the default language of pages

Added by Philipp Gampe about 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2013-04-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

An editor which has a language restriction to a non-default language can still edit page records in the default language via the page properties.
Editing content elements fails with "Language was not allowed".
The same message is shown if he edits the page properties, but only as debug message in the debug toolbar (bottom).


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #47126: Disable users which are restricted to only non default languages to handle page recordsClosed2013-04-11

Actions
Related to TYPO3 Core - Bug #75130: Editor with language restriction can edit page properties of default languageClosed2016-03-15

Actions
Actions #1

Updated by Frank Frewer about 11 years ago

Some more actions which should not be allowed to restricted users:
- via QuickEdit/[edit page properties]/'Move page'-button its possible to copy the page.
- via QuickEdit/[edit page properties]/'View record change history'-button its possible to change the page record.
- the user can manually call /typo3/sysext/cms/layout/db_layout.php?id=XX to edit the page record
- the same for history/undo: even if this entry in context menu is hidden the user could manually call the history modul via /typo3/show_rechis.php?element=pages:XX

Actions #2

Updated by Henrik Ziegenhain almost 11 years ago

I can confirm this for 6.0.x & 4.6.x

Patch from #47126 (thanks Frank) works, we only need a solution for this specific issue.

Actions #3

Updated by Henrik Ziegenhain almost 11 years ago

I did some research on this and found a simple solution for the main issue discovered by Philipp.
This solution does NOT solve the additional issues reported by Frank.

Page Module
Open typo3/sysext/backend/Classes/Controller/PageLayoutController.php and search for

// Edit page properties
if ($this->CALC_PERMS & 2) {

and replace with
// Edit page properties
if ($this->CALC_PERMS & 2 && $GLOBALS['BE_USER']->checkLanguageAccess(0)) {


List Module
Open typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php and search for

// If edit permissions are set (see class.t3lib_userauthgroup.php)
if ($localCalcPerms & 2 && !empty($this->id)) {

and replace with
// If edit permissions are set (see class.t3lib_userauthgroup.php)
if ($localCalcPerms & 2 && !empty($this->id) && $GLOBALS['BE_USER']->checkLanguageAccess(0)) {

My Question is how to put this to the review System? Could someone give me a hint/link to a documentation?

Actions #4

Updated by Philipp Gampe almost 11 years ago

Thanks for your findings.

Have a look here:
http://wiki.typo3.org/Contribution_Walkthrough_Tutorials

Actions #5

Updated by Gerrit Code Review almost 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20420

Actions #6

Updated by Henrik Ziegenhain almost 11 years ago

Hi Philipp,

thanks for your help. A few seconds ago I pushed my first patch to Gerrit :)
Hope everything is right.

Actions #7

Updated by Gerrit Code Review almost 11 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20453

Actions #8

Updated by Gerrit Code Review almost 11 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20454

Actions #9

Updated by Gerrit Code Review almost 11 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21143

Actions #10

Updated by Gerrit Code Review almost 11 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21144

Actions #11

Updated by Henrik Ziegenhain almost 11 years ago

I pushed a new patch to gerrit, which respects the new 6.2 and 4.5/4.7 for backporting.
I also changed two files mentioned by Dmitry.

Sorry for creating a new issue in Gerrit. How can I push a new patch set 2 for an existing one? (I am using TortoiseGit)

Actions #12

Updated by Stefan Neufeind almost 11 years ago

@Henrik: Just push to the same branch (for example master) and leave the Commit-Id unchanged. Gerrit will then know you're posting just a new revision and not a new patch.
Upon backports you'll then push to a different branch but still leave the Commit-Id unchanged. That will create a separate patch but will help keep track of the backport and it's siblings.

Actions #13

Updated by Gerrit Code Review almost 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20454

Actions #14

Updated by Henrik Ziegenhain almost 11 years ago

Sorry for my messy pushes and thanks to Stefan for the hint.

Now I got it right and pushed patch set 2 to the originally created issue and abandoned the other one to keep the comments.

Actions #15

Updated by Marti McFlight over 9 years ago

any progress?

Actions #16

Updated by Jens Jacobsen over 9 years ago

Well just stumbled across this "bug" in TYPO3 6.2.4
Nasty! Some progress on this would be fine.

Actions #17

Updated by Gerrit Code Review over 9 years ago

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

Actions #18

Updated by Gerrit Code Review over 9 years ago

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

Actions #19

Updated by Gerrit Code Review over 8 years ago

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

Actions #20

Updated by Gerrit Code Review over 8 years ago

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

Actions #21

Updated by Anonymous over 8 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF