Forums / Developer / New class permissions

New class permissions

Author Message

David Santiso

Saturday 15 January 2011 11:10:43 am

Hi,

I've created a new class. This class has some field data collectors (it's a form). I have not added any type of permission, but anonymous users can view and send this form. I would like that only members may submit this form.

How I can do?

Thank you very much,

David

Andrew Wigglesworth

Saturday 15 January 2011 11:34:45 am

You need to go into the "User Accounts" tab on the administration side and edit the "roles and policies" for anonymous users.

As a default they get to see (read) all content in "Section (standard)". You need to edit that policy so that they can only read what you want them to. ie. choose everything other than your new class.

Andrew Wigglesworth

Saturday 15 January 2011 11:48:05 am

Oh, other ways ... you could put the form in the "restricted" section, or maybe wrap the form part of the template in an {if} routine that checks whether the user is logged in. See the one used for checking user logins for comments.

Though, with wrapping the form in an {if} statement, I wonder whether there would be a slight risk of someone who knows the form field names posting the info anyway ... someone else will have to answer that one.

David Santiso

Saturday 15 January 2011 12:11:16 pm

I had thought the first option, but I didn't like. I like the second option, I'll try it.

Thaks,

David

David Santiso

Saturday 15 January 2011 1:26:54 pm

When I add content, I select restricted section, but is added in standard.

David Santiso

Saturday 15 January 2011 1:34:12 pm

I had not set either the section. Now it works as I want.

Thank you very much ;)

David Santiso

Sunday 16 January 2011 2:50:23 am

It seems that the restricted section is only for admin users. :S

Carlos Revillo

Sunday 16 January 2011 11:06:38 pm

You mean you only have access with admin users? well, this is how it works by default, but you can configure roles to let other type of users work with that section.

David Santiso

Monday 17 January 2011 10:41:33 am

In the end I've removed permission to the role "anonymous users".

Thank you very much ;)

eZ debug

Timing: Jan 17 2025 23:42:31
Script start
Timing: Jan 17 2025 23:42:31
Module start 'content'
Timing: Jan 17 2025 23:42:33
Module end 'content'
Timing: Jan 17 2025 23:42:33
Script end

Main resources:

Total runtime1.5497 sec
Peak memory usage4,096.0000 KB
Database Queries214

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 587.6094180.8516
Module start 'content' 0.00551.3457 768.4609602.6250
Module end 'content' 1.35120.1984 1,371.0859340.4453
Script end 1.5496  1,711.5313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2534210.0002
Check MTime0.00160.1008210.0001
Mysql Total
Database connection0.00060.039810.0006
Mysqli_queries1.472695.02442140.0069
Looping result0.00230.14782120.0000
Template Total1.520398.120.7602
Template load0.00200.125920.0010
Template processing1.518497.978220.7592
Template load and register function0.00010.009210.0001
states
state_id_array0.00120.075910.0012
state_identifier_array0.00180.115320.0009
Override
Cache load0.00170.1086320.0001
Sytem overhead
Fetch class attribute can translate value0.00180.115540.0004
Fetch class attribute name0.00150.0961100.0001
XML
Image XML parsing0.00100.063540.0002
class_abstraction
Instantiating content class attribute0.00000.0014110.0000
General
dbfile0.00230.1462270.0001
String conversion0.00000.000330.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
9content/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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs