Anonymous user create node

Author Message

Christian Johansen

Wednesday 05 April 2006 3:13:06 am

I have some information to collect, and the restrictions of the information collector led me to create a content class modeling an application. Anonymous users can create an application on the website, however I do not want anonymous users to be able to view/browse applications. What I did so far was this:

content  create Class( Application ) , Section( Applications ) , ParentClass( Folder )
content  edit 	  Class( Application ) , Section( Applications ) , Owner( Self )
content  read 	 Class( Application ) , Section( Applications ) , Owner( Self )

This kinda works, BUT, when the user "publishes" his application he is redirected to the parent folder in which he is not allowed to view, causing an error to occur. Is there any way to work around this? I would like the user to be redirected to his application, not its parent folder. Am I going about this the wrong way?

Kristof Coomans

Wednesday 05 April 2006 4:02:06 am

You can use the RedirectURIAfterPublish post variable:

http://ez.no/community/forum/setup_design/setting_where_user_ends_up_after_publising_content/
http://ez.no/community/forum/developer/redirect_after_publishing/
http://ez.no/community/forum/developer/node_number_at_first_publishing/

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

Christian Johansen

Wednesday 05 April 2006 4:33:47 am

Thanks. Looks like I'll be using your extension as well :) Another question - is it possible to send an email to the user and administrator when an application (or any type of node) is created?

Kristof Coomans

Wednesday 05 April 2006 4:54:47 am

You probably can use notifications for this ( http://ez.no/doc/ez_publish/technical_manual/3_6/features/notifications ).

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

Christian Johansen

Wednesday 05 April 2006 5:36:02 am

hmm, since anonymous users may send an application I cannot use notifications to send them a receipt. I guess I just have to do some extending then?

Kristof Coomans

Wednesday 05 April 2006 6:56:23 am

Maybe you can make a new workflow event type, which gets an e-mail address from an attribute of the published object and sends out an e-mail to that address.

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

Nathan Sharp

Friday 29 September 2006 10:23:08 am

I don't remember the name off the top of my head, but there is an extension in the contributions section that already does that (sends an e-mail based off of an attribute of the object published). It was pretty easy to set up and worked great for me. Sorry I don't have more specific information here, but hopefully it'll save someone some effort.

Kristof Coomans

Saturday 30 September 2006 6:11:36 am

Hi Nathan

Was it this contribution: http://ez.no/community/contribs/workflow/sck_cen_create_subtree_notification_rule or something else?

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

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 16:14:26
Script start
Timing: Jan 18 2025 16:14:26
Module start 'layout'
Timing: Jan 18 2025 16:14:26
Module start 'content'
Timing: Jan 18 2025 16:14:27
Module end 'content'
Timing: Jan 18 2025 16:14:27
Script end

Main resources:

Total runtime0.8560 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.0469152.6250
Module start 'layout' 0.00460.0020 741.671939.4453
Module start 'content' 0.00650.8478 781.1172622.0859
Module end 'content' 0.85440.0015 1,403.203116.1641
Script end 0.8559  1,419.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3419160.0002
Check MTime0.00120.1407160.0001
Mysql Total
Database connection0.00070.083810.0007
Mysqli_queries0.803493.8634740.0109
Looping result0.00050.0635720.0000
Template Total0.831897.220.4159
Template load0.00190.221420.0009
Template processing0.829896.949320.4149
Template load and register function0.00010.016810.0001
states
state_id_array0.00080.088410.0008
state_identifier_array0.00150.179020.0008
Override
Cache load0.00160.1890280.0001
Sytem overhead
Fetch class attribute can translate value0.00050.059430.0002
Fetch class attribute name0.00100.117390.0001
XML
Image XML parsing0.00070.079330.0002
class_abstraction
Instantiating content class attribute0.00000.0028120.0000
General
dbfile0.00080.0950160.0001
String conversion0.00000.000840.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
4content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs