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 ;)

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

Main resources:

Total runtime1.1945 sec
Peak memory usage4,096.0000 KB
Database Queries77

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.8906152.6094
Module start 'layout' 0.00610.0038 740.500039.4219
Module start 'content' 0.00991.1832 779.9219597.5625
Module end 'content' 1.19310.0013 1,377.484416.1875
Script end 1.1944  1,393.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2860160.0002
Check MTime0.00140.1209160.0001
Mysql Total
Database connection0.00060.050910.0006
Mysqli_queries1.129694.5716770.0147
Looping result0.00090.0781750.0000
Template Total1.157196.920.5786
Template load0.00240.198220.0012
Template processing1.154896.674920.5774
Template load and register function0.00020.015310.0002
states
state_id_array0.00140.114110.0014
state_identifier_array0.00170.138520.0008
Override
Cache load0.00200.1702320.0001
Sytem overhead
Fetch class attribute can translate value0.00060.046530.0002
Fetch class attribute name0.00100.0834100.0001
XML
Image XML parsing0.00070.062730.0002
class_abstraction
Instantiating content class attribute0.00000.0022110.0000
General
dbfile0.00090.0795160.0001
String conversion0.00000.001040.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
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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs