Jetspeed 2
  1. Jetspeed 2
  2. JS2-818

When importing users with seed data, user actual home pages from template

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: None
    • Labels:
      None

      Description

      When the importer creates new users, we would like for the user's home pages to be created as well from a template
      I am slating this for 2.2 but it may change

        Activity

        Hide
        David Sean Taylor added a comment -

        I tried to get it working once, but ran into a dead end because it started sucking in a lot of dependencies on the page manager in order for the serializer to run. Perhaps with the new build, its not so difficult. I was trying to create the user's home pages at runtime from the template. What I was thinking about, would be a different solution: delay the creation of the pages until runtime, on login. This would avoid the dependency issue I was having with running the serializer. A flag (security attribute) would be set on the user, and then upon login, we would check to see if the user needed to have their pages imported in from a template. This feature could actually be re-used for other cases, like resetting the home pages of users for example.

        Show
        David Sean Taylor added a comment - I tried to get it working once, but ran into a dead end because it started sucking in a lot of dependencies on the page manager in order for the serializer to run. Perhaps with the new build, its not so difficult. I was trying to create the user's home pages at runtime from the template. What I was thinking about, would be a different solution: delay the creation of the pages until runtime, on login. This would avoid the dependency issue I was having with running the serializer. A flag (security attribute) would be set on the user, and then upon login, we would check to see if the user needed to have their pages imported in from a template. This feature could actually be re-used for other cases, like resetting the home pages of users for example.
        Hide
        Woonsan Ko added a comment -

        Hi David,

        I simply implemented this feature by adding a new valve (RefreshUserHomepageValveImpl).
        This valve will work only after the user logs on and only once.
        If the security attribute for the user, "org.apache.jetspeed.profiler.refreshUserHomepage", is set to "true", then the valve will copy or merge templates to user folder. (If there already exists user folder, then templates are to be merged by default.)
        After working, the valve will update the flag attribute to "false", not to do more than once.

        I did a simple test by adding a security attribute, "org.apache.jetspeed.profiler.refreshUserHomepage" with "true" value in the user manager portlet.

        Show
        Woonsan Ko added a comment - Hi David, I simply implemented this feature by adding a new valve (RefreshUserHomepageValveImpl). This valve will work only after the user logs on and only once. If the security attribute for the user, "org.apache.jetspeed.profiler.refreshUserHomepage", is set to "true", then the valve will copy or merge templates to user folder. (If there already exists user folder, then templates are to be merged by default.) After working, the valve will update the flag attribute to "false", not to do more than once. I did a simple test by adding a security attribute, "org.apache.jetspeed.profiler.refreshUserHomepage" with "true" value in the user manager portlet.
        Hide
        Woonsan Ko added a comment -

        fixed

        Show
        Woonsan Ko added a comment - fixed

          People

          • Assignee:
            Woonsan Ko
            Reporter:
            David Sean Taylor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development