Forums / Setup & design / Anonymous user create node

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