how to stop coping for users ?!

Author Message

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.

Selmah Maxim

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 ?!?!

Selmah Maxim

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 228
function &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

Selmah Maxim

Thursday 22 May 2003 5:15:32 am

no problem :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:24:46
Script start
Timing: Jan 30 2025 21:24:46
Module start 'layout'
Timing: Jan 30 2025 21:24:46
Module start 'content'
Timing: Jan 30 2025 21:24:47
Module end 'content'
Timing: Jan 30 2025 21:24:47
Script end

Main resources:

Total runtime1.1131 sec
Peak memory usage8,192.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0034 588.1328151.2109
Module start 'layout' 0.00340.0027 739.3438220.6875
Module start 'content' 0.00621.1061 960.03134,464.9844
Module end 'content' 1.11230.0008 5,425.015611.8516
Script end 1.1131  5,436.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3018160.0002
Check MTime0.00140.1237160.0001
Mysql Total
Database connection0.00050.040610.0005
Mysqli_queries1.037593.2049630.0165
Looping result0.00050.0422610.0000
Template Total1.070796.220.5354
Template load0.00220.198520.0011
Template processing1.068595.991520.5342
Template load and register function0.00140.121610.0014
states
state_id_array0.00150.132410.0015
state_identifier_array0.00150.131420.0007
Override
Cache load0.00190.1664390.0000
Sytem overhead
Fetch class attribute can translate value0.00180.160320.0009
Fetch class attribute name0.00170.156760.0003
XML
Image XML parsing0.00060.054120.0003
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00070.0670170.0000
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs