[TYPO3-dev] A hook request for content access
tapio
tapio.markula at dnainternet.net
Thu Mar 2 19:08:01 CET 2006
Hi
Rico Moorman proposed a hook to
class.ux_sc_db_layout.php
and class.ux_sc_alt_doc.php
in order to give conditions for content access
These are the points of possible hooks:
// Checking internals access:
$recordAccess =
$BE_USER->recordEditAccessInternals($eRParts[0],$uidVal);
if($recordAccess==1)
{
if($BE_USER->user['admin']==0 && $rec['editlock']==1)
$recordAccess=0;
}
// 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;
}
$recordAccess and $hasAccess just returns a boolean value, if content
can be edited or not
I have extended it with a new condition.
That condition or any other condition could use a hook.
Could someone give some advice to create a hook for existing conditions
and possibe other conditions.
Could it be possible to put in future version as default hooks to these
places?
More information about the TYPO3-dev
mailing list