[TYPO3-dev] Rights for Content Elements

Dmitry Dulepov 9f4eetb02 at sneakemail.com
Thu Apr 12 11:42:35 CEST 2007


Martin Kutschker wrote:
> A hook for access check has been added recently. It's definitely in SVN 
> perhaps also for 4.1. Have a look at the latest postings in the Core 
> list, I think Dmitry Dulepov added it.

This hook makes it easy to add custom permission check (like for FCEs, 
where admin can let users to create oonly certain FCEs). But the 
function for checking permissions exists already for a long time. I do 
not know why it is not used by old page module. May be simply forgotten.

Check is as simple as:

if ($GLOBALS['BE_USER']->recordEditAccessInternals('tt_content', 
$idOrRow)) {
	// Add edit/delete icons
}

The same function is uses when saving and if it returns false, alt_doc 
displays error. So I just call it before editing in TV to make TV more 
user friendly :)

-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)




More information about the TYPO3-dev mailing list