Forums / Developer / Object states

Object states

Author Message

Lars Eirik R

Thursday 21 October 2010 4:35:34 am

Hi. I am working on version 4.4 and need to be able to run this with object states.

I have created a new section and assigned this to a subtree which should only be visible to anonymous users if the state of the objects within this section = Live on website

I have permissions such as these:

content read Subtree( News ) , Class( News_article ) , Section( limited ) ,StateGroup_workflow_states( Live on website )

content read Section( Standard , limited )

My quetion is this: will ez publish honor the the first record here as it is more limiting than record number 2.

I am not able to get this to work even though i have set the permissions and checked to make sure that objects within this subtree only have another state.

Any ideas what could be wrong?

Anyone out there who is actually using object states?

Lars Eirik R

Friday 22 October 2010 1:32:13 am

Sorry to stress this, but has anyone really tried out the object states functionality in ez4.4. I am not able to get it to work as expected.

Lars Eirik R

Thursday 16 December 2010 1:33:53 am

Not giving up on this topic guys..

The permission (p1) allows all anonymous users to read all objects, no limitations (referred to from now as p1)

If i create a new permission (p2) which allows only a certcain subtree to be read only if the object state = proofread will p2 be taken into account or will p1 which is effectively more liberal ignore p2 ?

I have created a new section for testing purposes called "Restricted Access" (referred to as r1)

Experiment

If i change so that p1 excludes content in r1 i seem to be able to have p2 honored.

p2 in this case is configured so that all elements within a certain subtree with a section r1 and object_state = proofread can be read by anonymous users.

I have also experienced issues with the fact that the subtree is ignored in the permission listing, but i am not sure if the code actually ignores the subtree limitation. (subtree bug is not a biggy for me, but should be fixed)

Please guys any respons to this problem?

Gaetano Giunta

Thursday 16 December 2010 1:56:22 am

Permissions are only additive in eZ, so if you give one that is more liberal than another, it's the more liberal one that "wins".

Unless there's bugs in the system, of course ;-)

Principal Consultant International Business
Member of the Community Project Board

Lars Eirik R

Thursday 16 December 2010 2:33:45 am

ok, so this basically means that if i create lots of new roles with very strict permissions i have to modify my liberal permission to have them work..

Thanks for quick response.

eZ debug

Timing: Jan 17 2025 23:57:52
Script start
Timing: Jan 17 2025 23:57:52
Module start 'content'
Timing: Jan 17 2025 23:57:52
Module end 'content'
Timing: Jan 17 2025 23:57:53
Script end

Main resources:

Total runtime0.9754 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 588.6719180.8594
Module start 'content' 0.00820.8571 769.5313567.8281
Module end 'content' 0.86530.1101 1,337.3594337.7109
Script end 0.9754  1,675.0703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4082210.0002
Check MTime0.00150.1502210.0001
Mysql Total
Database connection0.00090.090610.0009
Mysqli_queries0.891591.39632000.0045
Looping result0.00200.20371980.0000
Template Total0.946597.020.4733
Template load0.00200.200520.0010
Template processing0.944696.835120.4723
Template load and register function0.00020.018310.0002
states
state_id_array0.00060.060910.0006
state_identifier_array0.00090.089120.0004
Override
Cache load0.00170.1731350.0000
Sytem overhead
Fetch class attribute can translate value0.00120.122030.0004
Fetch class attribute name0.00100.100470.0001
XML
Image XML parsing0.00130.137630.0004
class_abstraction
Instantiating content class attribute0.00000.0022100.0000
General
dbfile0.00490.4975330.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs