HOWTO ? eZScript without permissions

Author Message

Björn Dieding@xrow.de

Thursday 16 September 2004 9:38:59 am

I was wondering...

What is the best way to let a script run with all permissions(Rights and Roles disabled)? Currenlty I bypassed this issue by always logging in as user "admin":

// login as admin
include_once( 'kernel/classes/datatypes/ezuser/ezuser.php' );
$user = eZUser::fetchByName('admin');
$user->loginCurrent();

Is there maybe a better way to disable permissions when running an eZScrpit instance from CLI?

Thanks and advance

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Bård Farstad

Thursday 16 September 2004 10:10:33 am

This would be a good way. It is not possible to disable permissions though, so you need to log in. Much of the functionality depends on a user beeing logged in.

--bård

Documentation: http://ez.no/doc

Björn Dieding@xrow.de

Thursday 16 September 2004 10:16:31 am

Y you are right about the functionality, I forgot about it.

Thx for the reply.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

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 19 2025 11:53:04
Script start
Timing: Jan 19 2025 11:53:04
Module start 'layout'
Timing: Jan 19 2025 11:53:04
Module start 'content'
Timing: Jan 19 2025 11:53:04
Module end 'content'
Timing: Jan 19 2025 11:53:04
Script end

Main resources:

Total runtime0.0200 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 590.2969152.6250
Module start 'layout' 0.00520.0031 742.921939.4609
Module start 'content' 0.00830.0093 782.382889.3672
Module end 'content' 0.01770.0023 871.750034.3047
Script end 0.0200  906.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003416.7601140.0002
Check MTime0.00189.1225140.0001
Mysql Total
Database connection0.00052.567310.0005
Mysqli_queries0.002411.935130.0008
Looping result0.00000.064310.0000
Template Total0.00188.810.0018
Template load0.00104.804810.0010
Template processing0.00084.001010.0008
Override
Cache load0.00062.906710.0006
General
dbfile0.004622.830780.0006
String conversion0.00000.040540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs