8 Replies Latest reply on Mar 24, 2011 4:11 PM by prabhat.jha

    How to set-up different portals for different Users

    xdsticker

      What I wanna do is to create a portal with different shells.

      The first shell is for people who havn't an account for the portal. (Group "Guest" with the ability to use the Guest-Portlet)

      The second shell is for user who have an account in the group "users". When they logged into the portal, they havn't to see the Guest-Portlet anymore. An different layout appers (different banner and menu, even other main portlets)

      The last group are managers. They even have to get another portal (everything different).

       

      IMPORTANT: Different usergroups need to have different "startpages" also.

       

      could you help me?

        • 1. How to set-up different portals for different Users
          rraposa

          It is actually pretty straightforward to accomplish what you want using GateIn. The navigation links and pages that a user sees in a portal are all based on the user's permissions.

           

          The User's Guide shows how to configure all of this using GateIn's web interface:

          http://docs.jboss.com/gatein/portal/3.1.0-FINAL/user-guide/en-US/html_single/index.html#sect-User_Guide-Manage_Permissions

           

          Start by creating the navigation links and pages for the different usergroups and only allow access to your links and pages based on the group a user is in.

           

          I think if you start playing around with the web interface you will figure this out pretty quickly.

          • 2. How to set-up different portals for different Users
            xdsticker

            Nope, it isnt as easy as you say.

            My example: 2 Portals! Not just one Portal with different Views. When I login with my "Worker"-Account (It's just a name of a group) I get the following response.

            img_058.jpeg

            Because the Portal try to route me to the "classic" Portal, but thats blocked for this user. The Worker User got his own Portal located under http://localhost:8080/portal/private/Worker-Portal/ (If I manually type this into my browser, it works. But it's useability is "unnice" )

             

            What I need: How to set-up the "Start" Page for every user. I know how to set permissions. But how to set-up the first site each group see after login.

             

            (There will be 4 Groups and each Group need their own Portal.)

             

            Sorry for my late answer and thanks for any response

            • 3. How to set-up different portals for different Users
              rraposa

              I see what you're trying to do. Here is an option that removes the "classic" portal and configures your new portals without using the web interface. These steps should also fix your navigation issue:

              1. Start with a clean JCR, so delete your /data folder and any JCR tables in your database (if your JCR is configured to a DB other than the default Hypersonic DB), or simply start with clean installation of GateIn.

              2. Don't start GateIn until you perform the following steps.

              3. Locate the folder gatein.ear/02portal.war/WEB-INF/conf/portal/portal/classic. Copy-and-paste the /classic folder and name it /Worker-Portal

              4. Open the file /Worker-Portal/portal.xml and change <portal-name> to "Worker-Portal".

              5. Open the file /Worker-Portal/navigation.xml and change "classic" to "Worker-Portal" everywhere in this file.

              6. Repeat steps 3-5 for your other portals that you want to define.

              7. Open the file gatein.ear/02portal.war/WEB-INF/conf/portal/portal-configuration.xml. Look for the default.portal value and change it from "classic" to whatever portal you want to be the default portal (e.g. Worker-Portal). Also, look for a HashSet named portal.configuration and add your new portal names to the list of portals. (You can delete "classic" from this list if you are not going to use it anymore).

              8. Start up GateIn and go to http://localhost:8080/portal. Your default portal should now load (in /public mode). Try logging in to one of your portals and see what happens.

               

              I hope that helps! Let me know if you get stuck somewhere.

               

              -Rich

              /gatein.ear/02portal.war/WEB-INF/conf/portal/portal-configuration.xml

              • 4. Re: How to set-up different portals for different Users
                xdsticker

                Thanks a lot for your fast reply

                 

                Okay, I try to give you an overview about what happend.

                 

                I did all of your steps

                img_059.jpeg

                I created 4 folders. (It's German)

                img_060.jpeg

                In every folder were 3 files. I changed one thing in the portal.xml and some more in the navigation.xml with "seach and change".

                img_061.jpeg

                I found the defaul.portal entry and changed it.

                img_062.jpeg

                I even found the hashsets...

                But when I started the server, it stucks after a couple of minutes at this step...

                img_064.jpeg

                because nothing happen here anymore, I looked for the server.log. 172MB *awesom* xD

                I dont want to make you connection melting, thats why I ziped it. If you wanna have a look into the file.

                It's uploaded here: http://rapidshare.com/files/454153092/server.zip (6,75MB, *.zip)

                 

                Thanks a lot

                 

                The Server got no internet connection. Is it recommended ?

                • 5. How to set-up different portals for different Users
                  rraposa

                  Your server didn't finish starting up. You need to run it again - but NOT in debug mode! Delete your /log folder and your /data folder, then start it up again.

                   

                  My guess is you ran out of memory somewhere.

                  • 6. Re: How to set-up different portals for different Users
                    xdsticker

                    Okay I going to start it up again, but I didn't changed anything related to the config.

                    The server display DEBUG in server.log out of the box.

                     

                    Lets see what happen now ...

                     

                    Wow, after 25minutes ... Server has been started

                     

                    But I think its still not working...

                    Let me show you again what I have to do. Here is my small präsentation

                     

                    img_065.jpeg


                    Important: The logged in user can't choose what Portal he what to see. He have to be forced to his environment.

                    • 7. How to set-up different portals for different Users
                      rraposa

                      If you are going to write 4 different portals and forward a user to a specific portal based on their role, I think you are going to need to write your own login portlet that contains this logic.

                       

                      Another option that is simpler would be to provide links from your Default Portal to each of the other 4 portals, but include /private in the URL. For example, if I want to go to the /Admin portal, create a link to http://host:8080/portal/private/Admin. If I'm not logged in, GateIn will ask me to login, then forward me to the /Admin portal. (Any URL with /private in it forces a user to be authenticated first).

                      1 of 1 people found this helpful
                      • 8. How to set-up different portals for different Users
                        prabhat.jha
                        1 of 1 people found this helpful