[Typo3-dev] two more be_module questions

Simon Child simondt at gpuk.net
Tue Feb 24 00:25:10 CET 2004


Qu 1.

The kickstarter creates dummy code for a backend module, with the function
main() starting as below:

==========
        function main() {
                global
$BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$HTTP_GET_VARS,$HTTP_POST_VARS,$C
LIENT,$TYPO3_CONF_VARS;

                // Access check!
                // The page will show only if there is a valid page and if
this page may be viewed
 by the user
                $this->pageinfo =
t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
                $access = is_array($this->pageinfo) ? 1 : 0;

                if (($this->id && $access) || ($BE_USER->user["admin"] &&
!$this->id )  {
==========

I don't understand the purpose of this access check.

The backend module is not referring to any page in the tree, and so for
non-admin be_users this check always fails.

Is there any reason why I shouldn't just comment out this access check, and
then all be_user will be able to access the module?

----------------
Qu 2.

I want to retrieve the identity of the be-user/group logged in and accessing
the module. Where shall I find that?

Thanks

-- 
Simon Child






More information about the TYPO3-dev mailing list