Create user folders

7 Messages Forum Options Options
Embed this topic
Permalink
schrei
Create user folders
Reply Threaded MoreMore options
Print post
Permalink
Hi,

I am using apachepas to authenticate our users. Therefor there are no
user folders.
And I don't want to use automembermaker because I don't want create a
user folder for everyone.
I want to create a action that allows every user to create a user
folder by his own.

Can somebody tell me how I can create a folder in python code to
achieve this.

Thanks


_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers
J Cameron Cooper-8
Re: Create user folders
Reply Threaded MoreMore options
Print post
Permalink
Dominik Ruf wrote:

> Hi,
>
> I am using apachepas to authenticate our users. Therefor there are no
> user folders.
> And I don't want to use automembermaker because I don't want create a
> user folder for everyone.
> I want to create a action that allows every user to create a user
> folder by his own.
>
> Can somebody tell me how I can create a folder in python code to

Plone 2.5, at least, creates member folders on login if they don't exist.

One will generally create content with the 'invokeFactory' method.

http://plone.org/documentation/how-to/add-content-programmatically

       --jcc

--
Connexions
http://cnx.org

"Building Websites with Plone"
http://plonebook.packtpub.com


_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers
schrei
Re: Create user folders
Reply Threaded MoreMore options
Print post
Permalink
Thanks the how-to helped a lot.

But I have still one problem.
An ordinary user has no privileges to create a folder.
Is there a possibility to run the code as a different user?

On 28 Aug., 00:01, J Cameron Cooper <jccoo...@...> wrote:

> Dominik Ruf wrote:
> > Hi,
>
> > I am using apachepas to authenticate our users. Therefor there are no
> > user folders.
> > And I don't want to use automembermaker because I don't want create a
> > user folder for everyone.
> > I want to create a action that allows every user to create a user
> > folder by his own.
>
> > Can somebody tell me how I can create a folder in python code to
>
> Plone 2.5, at least, creates member folders on login if they don't exist.
>
> One will generally create content with the 'invokeFactory' method.
>
> http://plone.org/documentation/how-to/add-content-programmatically
>
>        --jcc
>
> --
> Connexionshttp://cnx.org
>
> "Building Websites with Plone"http://plonebook.packtpub.com
>
> _______________________________________________
> Product-Developers mailing list
> Product-Develop...@...://lists.plone.org/mailman/listinfo/product-developers


_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers
schrei
Re: Create user folders
Reply Threaded MoreMore options
Print post
Permalink
OK I have found the solution.
I am using a metadata file
proxy = Manager

On 28 Aug., 09:31, Dominik Ruf <dominik...@...> wrote:

> Thanks the how-to helped a lot.
>
> But I have still one problem.
> An ordinary user has no privileges to create a folder.
> Is there a possibility to run the code as a different user?
>
> On 28 Aug., 00:01, J Cameron Cooper <jccoo...@...> wrote:
>
>
>
> > Dominik Ruf wrote:
> > > Hi,
>
> > > I am using apachepas to authenticate our users. Therefor there are no
> > > user folders.
> > > And I don't want to use automembermaker because I don't want create a
> > > user folder for everyone.
> > > I want to create a action that allows every user to create a user
> > > folder by his own.
>
> > > Can somebody tell me how I can create a folder in python code to
>
> > Plone 2.5, at least, creates member folders on login if they don't exist.
>
> > One will generally create content with the 'invokeFactory' method.
>
> >http://plone.org/documentation/how-to/add-content-programmatically
>
> >        --jcc
>
> > --
> > Connexionshttp://cnx.org
>
> > "Building Websites with Plone"http://plonebook.packtpub.com
>
> > _______________________________________________
> > Product-Developers mailing list
> > Product-Develop...@...://lists.plone.org/mailman/listinfo/product-developers
>
> _______________________________________________
> Product-Developers mailing list
> Product-Develop...@...://lists.plone.org/mailman/listinfo/product-developers


_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers
Derek Richardson-2
Re: Create user folders
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by schrei
Dominik Ruf wrote:
> Can somebody tell me how I can create a folder in python code to
> achieve this.

Look at invokeFactory. And this question is better for the plone-users
list than for plone-devel, which discusses the development of Plone itself.

Derek


_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers
Derek Richardson-2
Apologies
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by schrei
Sorry for the last two posts, where I advised people not to use
plone-devel. This is, of course, *not* plone-devel. So post away. :)

/me takes a break to regather sanity

Derek


_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers
Wichert Akkerman
Re: Create user folders
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by schrei
Some javascript/style in this post has been disabled (why?)
probably simpler:
mt=getToolByname(context, "portal_membership")
mt.createMemberArea(userid)
That will also set the permissions correctly and perform any other needed steps. It also does not need the manager proxy role since it is a public function.

Wichert.


Dominik Ruf wrote:
OK I have found the solution.
I am using a metadata file
proxy = Manager

On 28 Aug., 09:31, Dominik Ruf dominik...@... wrote:
  
Thanks the how-to helped a lot.

But I have still one problem.
An ordinary user has no privileges to create a folder.
Is there a possibility to run the code as a different user?

On 28 Aug., 00:01, J Cameron Cooper jccoo...@... wrote:



    
Dominik Ruf wrote:
      
Hi,
        
I am using apachepas to authenticate our users. Therefor there are no
user folders.
And I don't want to use automembermaker because I don't want create a
user folder for everyone.
I want to create a action that allows every user to create a user
folder by his own.
        
Can somebody tell me how I can create a folder in python code to
        
Plone 2.5, at least, creates member folders on login if they don't exist.
      
One will generally create content with the 'invokeFactory' method.
      
http://plone.org/documentation/how-to/add-content-programmatically
      
       --jcc
      
--
Connexionshttp://cnx.org
      
"Building Websites with Plone"http://plonebook.packtpub.com
      
_______________________________________________
Product-Developers mailing list
Product-Develop...@...
      
_______________________________________________
Product-Developers mailing list
Product-Develop...@...
    


_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers
  


-- 
Wichert Akkerman wichert@...   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.

_______________________________________________
Product-Developers mailing list
Product-Developers@...
http://lists.plone.org/mailman/listinfo/product-developers