Project

General

Profile

Actions

Bug #75332

closed

Saving relations to files in sys_file_metadata does not work for normal users

Added by Anonymous over 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2016-03-31
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

TYPO3 6.2.19

I have extended the sys_file_metadata table with a field which is a file relation.
When I am logged in as admin user everything works fine, I can create relations to other files and store them.
When I am logged in as a normal, nonadmin user (with all possible access rights), I get an "Access Denied" alert and can not save the relation.

Here a minimal setup:

myext/Configuration/Overrides/sys_file_reference.php

<?php
if (!defined('TYPO3_MODE')) die ('Access denied.');

$tca = array(
    'ctrl' => array(
        'rootLevel' => -1, // Otherwise File Reference will not work between files.
    ),
);

// Disable the File Upload in IRRE since it can not be configured the target storage.
$GLOBALS['TCA']['sys_file_reference']['columns']['uid_local']['config']['appearance']['fileUploadAllowed'] = FALSE;

\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['sys_file_reference'], $tca);

myext/Configuration/Overrides/sys_file_metadata.php

<?php
if (!defined('TYPO3_MODE')) die ('Access denied.');

if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('filemetadata')) {
    $configuration = '--div--;LLL:EXT:hszg_documents/Resources/Private/Language/locallang.xlf:tab.documents, files';
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('sys_file_metadata', $configuration);
}


Files

parent_file.png (55.8 KB) parent_file.png Parent file opened in filelist Sascha Maier, 2017-05-23 18:04
referenced_file.png (75.5 KB) referenced_file.png Referenced file opened out from parent file form Sascha Maier, 2017-05-23 18:04
parent_file_override_metadata.png (56.7 KB) parent_file_override_metadata.png Override metadata in of referenced file in parent file form Sascha Maier, 2017-05-23 18:04

Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Bug #71319: IRRE in sys_file_metadata doesn't work for normal usersClosed2015-11-04

Actions
Related to TYPO3 Core - Bug #81308: Deleting a referenced file via filelist module, definined in sys_file_metadataClosed2017-05-22

Actions
Related to TYPO3 Core - Bug #99516: Editors can't delete or disable file references attached to sys_file_metadataUnder Review2023-01-11

Actions
Has duplicate TYPO3 Core - Bug #76229: Missing edit options for non-admin users on references to sys_file_metadataClosed2016-05-18

Actions
Actions

Also available in: Atom PDF