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 Prashanth Gujjeti <Pr...@transerainc.com> on 2005/08/15 19:57:53 UTC

[J2] Managing user-specific pages

All,

I have a couple of questions on managing a user's pages.

- Is there any means by which you could automate the process of creating
user-specific directories? For our needs, we are to implement a custom
security valve. Is this the best place to create a user-specific
directory, if necessary.

- We would like to give the end users of the portal the means of
creating a new page of their own (or even delete their pages for that
matter). Is there any way to achieve this?

- Also, from an admin's perspective, is the Portlet Site Browser/Detail
implementation complete? Is there any other means of managing the site
tree?

Thanks for your time.

- Prashanth

PS: David, thanks for your response on the J2 Authentication and
pipeline question. It was helpful in addressing our issues.

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


Re: [J2] Managing user-specific pages

Posted by James Liao <ji...@gmail.com>.
Great! That is just what I waiting for and eager to see.

Cheer up!

-James Liao

On 8/18/05, David Sean Taylor <da...@bluesunrise.com> wrote:
> Prashanth Gujjeti wrote:
> > All,
> >
> > I have a couple of questions on managing a user's pages.
> >
> > - Is there any means by which you could automate the process of creating
> > user-specific directories? For our needs, we are to implement a custom
> > security valve. Is this the best place to create a user-specific
> > directory, if necessary.
> >
> Im creating user-specific directories during new user registration on 2
> J2 projects. Here's a code snippet that might help...
> 
>              userManager.addUser(username, password);
> 
>              // String role = actionRequest.getParameter(ROLES_CONTROL);
>              // if (!SecurityUtil.isEmpty(role) && user != null)
>              // {
>              // roleManager.addRoleToUser(userName, role);
>              // }
> 
>              // create user's home page and folder
>              Folder folder = pageManager
>                      .newFolder(Folder.USER_FOLDER + username);
>              setSecurityConstraints(folder, username);
>              pageManager.updateFolder(folder);
> 
>              String templateFolder =
> actionRequest.getPreferences().getValue(
>                      "newUserTemplateDirectory", "/_user/template/");
> 
>              // TODO: copy the entire dir tree, not just the
> default-page.psml
>              Page template = pageManager.getPage(templateFolder
>                      + "default-page.psml");
>              pageManager.clonePage(template, Folder.USER_FOLDER + username
>                      + "/default-page.psml");
> 
> 
> Also, see the User Manager Admin portlet.
> When you create a new user with this portlet, it automatically clones a
> single PSML file for the user from the _user/templates directory. This
> feature will be enhanced to allow more elaborate PSML cloning. Depending
> on the profiling rule of the user, there are times when you might not
> want to clone files, but instead use role based aggregation or fallback.
> 
> 
> 
> > - We would like to give the end users of the portal the means of
> > creating a new page of their own (or even delete their pages for that
> > matter). Is there any way to achieve this?
> >
> Yes, thats in the plans for the final release.
> It would be a mini-version of the Site Browser (below) with the ability
> to only manage the users's own pages
> 
> > - Also, from an admin's perspective, is the Portlet Site Browser/Detail
> > implementation complete? Is there any other means of managing the site
> > tree?
> >
> No its not yet complete. Wish I had more time on that one, I was making
> some good progress. I do plan to complete it for the final release.
> 
> 
> 
> --
> David Sean Taylor
> Bluesunrise Software
> david@bluesunrise.com
> [office] +01 707 773-4646
> [mobile] +01 707 529 9194
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
>

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


Re: [J2] Managing user-specific pages

Posted by David Sean Taylor <da...@bluesunrise.com>.
Prashanth Gujjeti wrote:
> All,
> 
> I have a couple of questions on managing a user's pages.
> 
> - Is there any means by which you could automate the process of creating
> user-specific directories? For our needs, we are to implement a custom
> security valve. Is this the best place to create a user-specific
> directory, if necessary.
> 
Im creating user-specific directories during new user registration on 2
J2 projects. Here's a code snippet that might help...

             userManager.addUser(username, password);

             // String role = actionRequest.getParameter(ROLES_CONTROL);
             // if (!SecurityUtil.isEmpty(role) && user != null)
             // {
             // roleManager.addRoleToUser(userName, role);
             // }

             // create user's home page and folder
             Folder folder = pageManager
                     .newFolder(Folder.USER_FOLDER + username);
             setSecurityConstraints(folder, username);
             pageManager.updateFolder(folder);

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

             // TODO: copy the entire dir tree, not just the
default-page.psml
             Page template = pageManager.getPage(templateFolder
                     + "default-page.psml");
             pageManager.clonePage(template, Folder.USER_FOLDER + username
                     + "/default-page.psml");


Also, see the User Manager Admin portlet.
When you create a new user with this portlet, it automatically clones a
single PSML file for the user from the _user/templates directory. This
feature will be enhanced to allow more elaborate PSML cloning. Depending
on the profiling rule of the user, there are times when you might not
want to clone files, but instead use role based aggregation or fallback.



> - We would like to give the end users of the portal the means of
> creating a new page of their own (or even delete their pages for that
> matter). Is there any way to achieve this?
> 
Yes, thats in the plans for the final release.
It would be a mini-version of the Site Browser (below) with the ability
to only manage the users's own pages

> - Also, from an admin's perspective, is the Portlet Site Browser/Detail
> implementation complete? Is there any other means of managing the site
> tree?
>
No its not yet complete. Wish I had more time on that one, I was making
some good progress. I do plan to complete it for the final release.



-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194


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