Project

General

Profile

Actions

Feature #89223

open

Using columnsOnly creates a button to edit whole record.....

Added by Claus Harup over 4 years ago. Updated over 3 years ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2019-09-23
Due date:
% Done:

0%

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

Description

It has been a mystery to me for years why a "Edit whole record" button is created when 'columnsOnly' is used as parameter in links to edit various TCA records...
In my mind; 'columnsOnly' should restrict the editor to ONLY see these columns.....?!?!!?

In sysext/backend/Classes/Controller/EditDocumentController.php at line 1413:

// If only SOME fields are shown in the form, this will link the user to the FULL form:
if ($this->columnsOnly) {
    $columnsOnlyButton = $buttonBar->makeLinkButton()
        ->setHref($this->R_URI . '&columnsOnly=')
        ->setTitle($lang->getLL('editWholeRecord'))
        ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
            'actions-open',
            Icon::SIZE_SMALL
        ));

    $buttonBar->addButton($columnsOnlyButton, ButtonBar::BUTTON_POSITION_LEFT, 3);
}

Could some sort of extra configuration be added (&disableWholeRecord=1)


Files

screen.png (15.9 KB) screen.png Claus Harup, 2019-09-23 10:54
Actions #1

Updated by Oliver Bartsch over 3 years ago

Hi,

columnsOnly is used to render records with limited fields for e.g. better overview because only some fields are needed in a specific context.

This means, columnsOnly is not the tool to restrict fields for editors. This is must be done by usergroup permissions (ACL: non_exclude_fields).

Therefore it's valid in my eyes that the "Edit record button" gets rendered here because if permissions are set correctly the "whole record" will also be limited.

Actions #2

Updated by Benni Mack over 3 years ago

  • Status changed from New to Needs Feedback

Correct. This columnsOnly is to only add a specific selection of fields (possible from coming from the list module). Regarding permission this is not the way to go. Does setting proper permission solve your case? Or you could disable fields on a per-page/per-user basis with TSconfig?

Actions #3

Updated by Claus Harup over 3 years ago

The smart thing would be to add a possibility to set the parameter saying: ......&columnsOnly=title,abstract&hideEditWholeRecord=1

Actions #4

Updated by Benni Mack over 3 years ago

Claus Harup wrote:

The smart thing would be to add a possibility to set the parameter saying: ......&columnsOnly=title,abstract&hideEditWholeRecord=1

Sure, but why? This covers the visibility but people could work around that (badly) by using any other module.

Actions #5

Updated by Claus Harup over 3 years ago

Let us say I create a be module (*) and I want my editors to see a list of fe_users and ONLY want them to alter username and password - NO OTHER FIELDS!!!! :-)

(*) This module is THE ONLY module they can access when logged in.

Actions #6

Updated by Oliver Bartsch over 3 years ago

Hi, sorry for getting back to you so late.

Regarding your feedback, what about adding a backend user group for these editors only allowing them to edit the username and password field. Does this work for you?

Actions #7

Updated by Claus Harup over 3 years ago

Unforetunately no :-(

...adding &hideEditWholeRecord=1 would solve ANY variants of functionalities IMO.

Try to imagine, that you would like to create 2 be modules and in the first you would like to create a link like columnsOnly=username and in the other columnsOnly=password.... and I ONLY want these fields in the form...... - plain and simple :-)

Actions

Also available in: Atom PDF