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
[EMAIL PROTECTED]
[office] +01 707 773-4646
[mobile] +01 707 529 9194
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]