Forums / Setup & design / how to stop coping for users ?!
Selmah Maxim
Thursday 22 May 2003 2:24:26 am
Hi ..
Another role problem ...
i had gaved for registered users create and edit roles, work nice, but when user go to sitemap, he can can create in the main folder what he want, and he can copy objects to another place ... i had searched the roles for this, i had have gived the right roles (as i think) with create he can copy and create in main folder ... how to stop this ?
thx.
Thursday 22 May 2003 2:38:11 am
maybe i found BUG !
now, i changed the users role, now they cann`t copy or create in the main folder, but if i write content/copy/NODE_ID , i get white page, and the debug report find errors :
Missing argument 2 for handleerror() in c:\php\www\ez32\lib\ezutils\classes\ezmodule.php on line 228
Undefined variable: errorType in c:\php\www\ez32\lib\ezutils\classes\ezmodule.php on line 236
No template could be loaded for "error//3.tpl" using resource "design"
template 3.tpl is there under /design/my/templates/content/error/kernel .
is this bug, or i made somthing error here ?!?!
Thursday 22 May 2003 3:01:30 am
Small Bug found !
kernel/content/copy.php line 44: if ( $object === null ) return $Module->handleError( EZ_ERROR_KERNEL_NOT_AVAILABLE, "kernel" );
and to avoide this bug in another files, i had added $errorType default 'kernel'
lib\ezutils\classes\ezmodule.php line 228function &handleError( $errorCode, $errorType="kernel", $parameters = array() )
Jan Borsodi
Thursday 22 May 2003 4:28:32 am
Thanks, I've added the fix in copy.php.
I've also fixed the handleError to handle errors more gracefully ;). It will now allow the error type to not be supplied in which case it assumes 'kernel' and issues a warning. function &handleError( $errorCode, $errorType = false, $parameters = array() ) { if ( !$errorType ) { eZDebug::writeWarning( "No error type specified for error code $errorCode, assuming kernel.\nA specific error type should be supplied, please check your code.", 'eZModule::handleError' ); $errorType = 'kernel'; }
-- Amos Documentation: http://ez.no/ez_publish/documentation FAQ: http://ez.no/ez_publish/documentation/faq
Thursday 22 May 2003 5:15:32 am
no problem :)