You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by massimo malvestio <ma...@cardinis.com> on 2006/10/18 17:54:32 UTC

jetspeed2: user creation

Hi all!
I want to import all registered users from our main application Cardinis 
into Jetspeed. To do so I have created a portlet that retrieves all 
users, it displays them, and let manager choose users to import. To 
create Jetspeed users I have used the same code of UserDetailsPortlet:
1) UserManager.add()
2) RoleManager.addRoleToUser(), I use "user" as default role
3) Profiler.setRuleForPrincipal(), I use "j2" as default rule
Users are created with right attributes BUT corrispective users' 
directories in _user not. Is there something else to invoke to force 
directories creation???
Thanks

-- 
Massimo Malvestio
Software Developer
massimo.malvestio@cardinis.com
_______________________________________________
CARDINIS Solutions SpA
Your Governance Solutions
via San Crispino, 46    I-35129 Padova - Italy
tel.(+39) 049.7803370/8072095
fax (+39) 049.7800824
www.cardinis.com

---
Questo messaggio è strettamente riservato ai destinatari specificati.
Se è ricevuto per errore si prega di avvisare il mittente e di cancellarlo
dal proprio sistema.
-
This message is specifically addressed to the recipient(s).
Should you receive it by mistake, please notify the sender and delete it
from your system. 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: jetspeed2: user creation

Posted by massimo malvestio <ma...@cardinis.com>.
David Sean Taylor wrote:
> massimo malvestio wrote:
>> Hi all!
>> I want to import all registered users from our main application 
>> Cardinis into Jetspeed. To do so I have created a portlet that 
>> retrieves all users, it displays them, and let manager choose users 
>> to import. To create Jetspeed users I have used the same code of 
>> UserDetailsPortlet:
>> 1) UserManager.add()
>> 2) RoleManager.addRoleToUser(), I use "user" as default role
>> 3) Profiler.setRuleForPrincipal(), I use "j2" as default rule
>> Users are created with right attributes BUT corrispective users' 
>> directories in _user not. Is there something else to invoke to force 
>> directories creation???
>> Thanks
>>
> Take a look a closer look at the UserDetailsPortlet, around line 1054
>
>                 String templateFolder = 
> actionRequest.getPreferences().getValue("newUserTemplateDirectory", 
> "/_user/template/");
>
>                 // copy the entire dir tree from the template folder
>                 Folder source = pageManager.getFolder(templateFolder);
>                 pageManager.deepCopyFolder(source, Folder.USER_FOLDER 
> + userName, userName);
>
Sorry, my JS2 sources were too old, so I had not that portion of code ^___^'
Thanks a lot, now everything goes!!

-- 
Massimo Malvestio
Software Developer
massimo.malvestio@cardinis.com
_______________________________________________
CARDINIS Solutions SpA
Your Governance Solutions
via San Crispino, 46    I-35129 Padova - Italy
tel.(+39) 049.7803370/8072095
fax (+39) 049.7800824
www.cardinis.com

---
Questo messaggio è strettamente riservato ai destinatari specificati.
Se è ricevuto per errore si prega di avvisare il mittente e di cancellarlo
dal proprio sistema.
-
This message is specifically addressed to the recipient(s).
Should you receive it by mistake, please notify the sender and delete it
from your system. 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: jetspeed2: user creation

Posted by David Sean Taylor <da...@bluesunrise.com>.
massimo malvestio wrote:
> Hi all!
> I want to import all registered users from our main application Cardinis 
> into Jetspeed. To do so I have created a portlet that retrieves all 
> users, it displays them, and let manager choose users to import. To 
> create Jetspeed users I have used the same code of UserDetailsPortlet:
> 1) UserManager.add()
> 2) RoleManager.addRoleToUser(), I use "user" as default role
> 3) Profiler.setRuleForPrincipal(), I use "j2" as default rule
> Users are created with right attributes BUT corrispective users' 
> directories in _user not. Is there something else to invoke to force 
> directories creation???
> Thanks
> 
Take a look a closer look at the UserDetailsPortlet, around line 1054

                 String templateFolder = 
actionRequest.getPreferences().getValue("newUserTemplateDirectory", 
"/_user/template/");

                 // copy the entire dir tree from the template folder
                 Folder source = pageManager.getFolder(templateFolder); 

                 pageManager.deepCopyFolder(source, Folder.USER_FOLDER + 
userName, userName);


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org