File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,12 @@ public function handleDownloadRequest(ServerRequestInterface $request): Response
105
105
if ($ this ->table === '' ) {
106
106
throw new \RuntimeException ('No table was given for downloading records ' , 1623941276 );
107
107
}
108
+
109
+ $ backendUser = $ this ->getBackendUserAuthentication ();
110
+ if (!$ backendUser ->check ('tables_select ' , $ this ->table )) {
111
+ throw new AccessDeniedException ('Insufficient permissions for accessing this download ' , 1756895674 );
112
+ }
113
+
108
114
// @todo we might want to throw an exception in case no schema exists for the table
109
115
$ schema = $ this ->tcaSchemaFactory ->has ($ this ->table ) ? $ this ->tcaSchemaFactory ->get ($ this ->table ) : null ;
110
116
$ this ->format = (string )($ parsedBody ['format ' ] ?? '' );
@@ -123,7 +129,6 @@ public function handleDownloadRequest(ServerRequestInterface $request): Response
123
129
$ tsConfig = is_array ($ tsConfig ) ? $ tsConfig : null ;
124
130
125
131
// Loading current page record and checking access
126
- $ backendUser = $ this ->getBackendUserAuthentication ();
127
132
$ perms_clause = $ backendUser ->getPagePermsClause (Permission::PAGE_SHOW );
128
133
$ pageinfo = BackendUtility::readPageAccess ($ this ->id , $ perms_clause );
129
134
$ searchString = (string )($ parsedBody ['searchString ' ] ?? '' );
You can’t perform that action at this time.
0 commit comments