Forums / General / Extensions and Roles

Extensions and Roles

Author Message

Carlos Revillo

Thursday 22 December 2005 4:39:54 am

Hi. I'm developing a small extension for my porpouses. In function_definition.php of the extension, i have defined to functions. One is called 'add' and the other one is called 'view'.

Now, i want give access to anonymous role to 'add' function but not to 'view' function. I know how to give access to anonymous role to all functions of my extension, but how i can give only to one of them?.

Kristof Coomans

Thursday 22 December 2005 5:36:08 am

The functions you are talking about, are template fetch functions. They are not the same as the policy functions used by the role system.

As far as i know, you can not add policies for fetch functions. You can only assign policies to control module/view access (see http://ez.no/community/forum/developer/limiting_within_viewlist_possible ). Of course, you can check in your fetch functions if the current user has the required policies to use the function.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Carlos Revillo

Thursday 22 December 2005 5:58:32 am

Thanks a lot. I was wrong about that but what you tell me is enough to solve my problem.

Yet another question related to roles. Let's see. I've created some content (folders, articles and custom content) as administrator. Late, I've created a new user in Editors Group. I logon into the admin interface with this new account and also can create new content and other things, but i can't find the way to edit content created by administrators... This contents does not appears in tree content, by the way. Is this possible?.

Thanks so much.

Kristof Coomans

Friday 23 December 2005 1:02:31 am

Do the users in the Editors group have permission to view the objects?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Carlos Revillo

Friday 23 December 2005 2:00:42 am

I give editors users access to all functions in content module.
but, as i said before, when i logon as editor i can't see content created by admins.
thanks.

eZ debug

Timing: Jan 19 2025 21:33:43
Script start
Timing: Jan 19 2025 21:33:43
Module start 'content'
Timing: Jan 19 2025 21:33:44
Module end 'content'
Timing: Jan 19 2025 21:33:44
Script end

Main resources:

Total runtime0.9056 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.0079 588.8438180.8516
Module start 'content' 0.00790.7669 769.6953558.7578
Module end 'content' 0.77480.1307 1,328.4531337.3906
Script end 0.9055  1,665.8438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.5188210.0002
Check MTime0.00190.2150210.0001
Mysql Total
Database connection0.00120.132310.0012
Mysqli_queries0.828491.47802000.0041
Looping result0.00210.23061980.0000
Template Total0.869496.020.4347
Template load0.00240.266720.0012
Template processing0.867095.739720.4335
Template load and register function0.00020.022910.0002
states
state_id_array0.00110.120510.0011
state_identifier_array0.00210.232120.0011
Override
Cache load0.00200.2224200.0001
Sytem overhead
Fetch class attribute can translate value0.00160.172330.0005
Fetch class attribute name0.00110.121160.0002
XML
Image XML parsing0.00090.100630.0003
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00470.5186270.0002
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/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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs