Create user folders

Wichert Akkerman wichert at wiggy.net
Wed Aug 29 09:13:36 UTC 2007


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... at googlemail.com> 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... at rice.edu> 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... at lists.plone.orghttp://lists.plone.org/mailman/listinfo/product-developers
>>>       
>> _______________________________________________
>> Product-Developers mailing list
>> Product-Develop... at lists.plone.orghttp://lists.plone.org/mailman/listinfo/product-developers
>>     
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers
>   


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20070829/51e99ac1/attachment.html>


More information about the Product-Developers mailing list