4 Replies Latest reply on Aug 19, 2008 4:27 PM by amouradi

    custom user and Jboss user

    amouradi

      Hi All,

      Would appreciate if someone can point in a right direction.
      I have a portlet deployed in Jboss portal that pulls data from our database
      and displays them.
      Now I want to map displayed data to a logged in user and our own customer,
      what would the best way to do it, so users will see only their own data?

      Should I implement Custom login module or just getting logged in user
      info and storing it in my database is good enough?
      Just not sure if there is a recommended path for situations like that.

      I'm using Spring Portal MVC and Hibernate.

      Thank you!
      AM

        • 1. Re: custom user and Jboss user
          peterj

          I will assume that your database is different from the portal's database. Then your code should get the user identity from the portal and use that identity within your own database.

          • 2. Re: custom user and Jboss user
            amouradi

            Hi Peter,

            Thanks for your response! Do you think storing portal username and mapping to our databse customerId is reasonable approach then?
            I think I would either need to implement AuthenticationEventListener
            so mapping between my customer and portal user gets created if it has not existed before, or have a custom portlet that does that.
            What do you think?

            Thanks!
            Ann

            • 3. Re: custom user and Jboss user
              peterj

              Not having done this, I am not sure of the best approach (perhaps someone who has done this can provide some insight). But having a listener that gets invoked when a new user registers would be ideal.

              • 4. Re: custom user and Jboss user
                amouradi

                Thanks, Peter!
                I'll try with the listener and see how it goes.

                Might even post code here if all goes well.
                Ann