appendPolicy and siteaccess CRC encoding

Author Message

Matthieu Sévère

Wednesday 28 April 2010 7:29:55 am

Hello,

I just saw that when adding a policy with limitation to a siteacces the siteaccess value has to be the CRC of his name :

$role->appendPolicy( "user", "login", array( "SiteAccess" => array( eZSys::ezcrc32( $dstSiteaccess ) ) ) );

Anyone know why ?

It is especially used in ezxmlinstaller and when ezteamroom is installed :

<SiteAccess>2978804645</SiteAccess> {* CRC value of "ezteamroom" *}

It implies that siteacces name is hardcoded ;-(

Thanks for your anwsers :)

--
eZ certified developer: http://ez.no/certification/verify/346216

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 18 2025 02:01:14
Script start
Timing: Jan 18 2025 02:01:15
Module start 'layout'
Timing: Jan 18 2025 02:01:15
Module start 'content'
Timing: Jan 18 2025 02:01:15
Module end 'content'
Timing: Jan 18 2025 02:01:15
Script end

Main resources:

Total runtime0.9825 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.1641152.6406
Module start 'layout' 0.00610.0034 741.804739.4766
Module start 'content' 0.00950.9719 781.2813472.2109
Module end 'content' 0.98130.0011 1,253.49228.2813
Script end 0.9825  1,261.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3164160.0002
Check MTime0.00130.1340160.0001
Mysql Total
Database connection0.00100.099110.0010
Mysqli_queries0.941895.8619460.0205
Looping result0.00050.0542440.0000
Template Total0.948996.620.4745
Template load0.00210.218520.0011
Template processing0.946896.364720.4734
Template load and register function0.00010.014210.0001
states
state_id_array0.00060.063610.0006
state_identifier_array0.00100.099120.0005
Override
Cache load0.00180.1824120.0001
Sytem overhead
Fetch class attribute can translate value0.00060.063810.0006
Fetch class attribute name0.00060.057620.0003
XML
Image XML parsing0.00050.055110.0005
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00170.1774160.0001
String conversion0.00000.000740.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs