Feature #14940
closedBetter access control for content elements
0%
Description
Hi
I made access control for individual elements on the base if someone is an admin user or not.
Each content element has a checkbox for restrict access from non-admin users (basically the same feature, which the 'pages' tables has today - I even set the same field name 'editlock')
Changes made to 'alt_doc.php' and 'db_layout.php' + an extension (tm_contentaccess).
Features in the extension should implement in the core files of Typo3.
chages to 'alt_doc.php'
row 655
// Check internals regarding access:
if ($hasAccess) {
$hasAccess = $BE_USER->recordEditAccessInternals($table, $calcPRec);
if($hasAccess==1)
{
if($BE_USER->user['admin']==0 && $calcPRec['editlock']==1)
$hasAccess=0;
}
$deniedAccessReason = $BE_USER->errorMsg;
}
db_layout.php
on line about 730
else {
$rec['uid'] = $uidVal;
// Checking internals access:
$recordAccess = $BE_USER->recordEditAccessInternals($eRParts[0],$uidVal);
if($recordAccess==1)
{
if($BE_USER->user['admin']==0 && $rec['editlock']==1)
$recordAccess=0;
}
}
(issue imported from #M1401)
Files