Dinamically creating a folder, asigning roles...

Author Message

Jorge estévez

Tuesday 05 October 2004 9:47:59 pm

Hi!

I have to implement a large site mainly focusing on news (just like a newspaper), I want users to subscribe to the site, but in the process of subscribing i would like to:

1. Create a folder for the user subscribing (e.g. My folder)

2. Let the user have access to this folder (create other folders inside of it, etc)

3. Allow the user to navigate the site and be able to select articles and MOVE them (a copy of course) to his personal folder (or directories inside), I tink this could be something like an article-wish-list or similar...

Of course each user will have his own folder to "save" articles all around the site.

Can someone point out ideas on how to do such a task? Something to start investigating...

Thanks... so much!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Silke Fox

Wednesday 06 October 2004 5:43:01 am

Hi,

you will need a workflow for this. The workflow should be assigned to trigger "content publish after" and perform the following stuff:
- create personal folder for the newly subscribed user
- remember the node id of this folder
- assign role "personal folder" with subtree limitation on that folder to the user
Not sure, but maybe eZPolicyLimitationValue::createNew() will do the trick.
The basic role (e.g. "personal folder") must be created by hand first (content create *?).

Concerning 3.:
The copy function (/content/copy/<objectid>) will do it, though I'm not sure how to set the correct destination (i.e. the user's folder) here.

Hope that helps a bit.
silke

PS: This topic should be placed in the developer forum.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.