9 Replies Latest reply on Sep 30, 2006 8:31 PM by noicangi

    login portlet and CMS admin

    noicangi

      hi, i'am using win xp + mysql + jboss portal 2.2sp3 + jboss 404

      my question is the following:

      i would like to know how can i modify loggin portlet to create diferent instances of the portlet , like connecting to other databases and validating user after.

      also i would like to diferent people could upload files to different private directories in the cms.

      i download portal source but i cant find the portlets.

      any idea i would be well recived ;)

      thanks

      NX

        • 1. Re: login portlet and CMS admin
          noicangi

          hi, my idea is to modify the login portlet and the theme of the login page, also try to use another database for the login portlet so i can create diferent instances of the same portlet for diferent portals.

          • 2. Re: login portlet and CMS admin
            soshah

            noicangi-

            Login screen in jboss portal is not actually a portlet.

            Its a plain jsp page that integrates with the Tomcat JAAS login Module for authentication.


            It is easier to achieve what you are trying to do, by creating a different login screen for each one of your portals, and using a different JAAS login module to perform the authentication of each portal.

            Hope this points you in the right direction.

            Thanks
            Sohil

            • 3. Re: login portlet and CMS admin

              Maybe you can definite a custom JAAS authentication class to instead.

              • 4. Re: login portlet and CMS admin
                noicangi

                thakns sohil.shah and jsports , i will look for jass jsp page, but in the portal the "login portlet" its in english, that why i would like it to modify it.


                Another question is about the CMS, i would like to create diferent private folders for the instances of portals.


                sorry but this is a constructive point: ¿why if JB portal is a portal contenedor the login and cms portlets are dificult to instance for diferent portals?

                i will look for the login module and check the jackrabbit documentation. but that the long way :P

                thanks

                • 5. Re: login portlet and CMS admin
                  noicangi

                  ok i understand you use diferent jass modules but where i can find that? y check portal.sar but theres nothing :P

                  actually if y loggin to portalA im logged to portalB too that's not the idea of a portal of portals or i'm wrong?

                  please help

                  • 6. Re: login portlet and CMS admin
                    soshah

                    Nicolas-

                    checkout portal.sar/conf/logn-config.xml. This is where the default JAAS login module for the top level portal running under /portal directory is specified.


                    You can specify as many portals as you like similar to /marketing, /accounting, /somethingelse and associate a login module for each context.


                    As far as CMS goes, by default there is a top-level folder called /default where all the content is stored and rendered by the CMSPortlet.

                    For each of your portals you use a slightly modified CMSPortlet that points to /myfolder instead of /default to render its content

                    Thanks
                    Sohil

                    • 7. Re: login portlet and CMS admin
                      noicangi

                      Sohil-

                      ok, correct me if i'm wrong please:


                      !!!! this is the original DB file (example)

                      <?xml version="1.0" encoding="UTF-8"?>
                      <datasources>
                       <local-tx-datasource>
                       <jndi-name>PortalDS</jndi-name>
                       <connection-url>jdbc:mysql://localhost:3306/jbossportal?useServerPrepStmts=false</connection-url>
                       <driver-class>org.gjt.mm.mysql.Driver</driver-class>
                       <user-name>root</user-name>
                       <password>admin</password>
                       </local-tx-datasource>
                      
                      ------here i add my other DB config -----
                      
                      <datasources>
                       <local-tx-datasource>
                       <jndi-name>PortalDS</jndi-name>
                       <connection-url>jdbc:mysql://localhost:3306/nicolas?useServerPrepStmts=false</connection-url>
                       <driver-class>org.gjt.mm.mysql.Driver</driver-class>
                       <user-name>nicolas</user-name>
                       <password>nicolas</password>
                       </local-tx-datasource>
                      </datasources>


                      here i add all DB i want to connect

                      now the login-config.xml:

                       <application-policy name="portal">
                       <authentication>
                       <login-module code="org.jboss.portal.core.security.jaas.ModelLoginModule" flag="required">
                       <module-option name="unauthenticatedIdentity">guest</module-option>
                       <module-option name="hashAlgorithm">MD5</module-option>
                       <module-option name="hashEncoding">HEX</module-option>
                       <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
                       <module-option name="additionalRole">Authenticated</module-option>
                       <module-option name="password-stacking">useFirstPass</module-option>
                       </login-module>
                       </authentication>
                       </application-policy>
                      


                      now i have to change java:/portal/UserModule by java:/myportal , thats all?

                      and every time i create a portal and i want a unique database for this portal i do this?


                      about the CMS repository i tried to change the cms by the portal instances without result, i download the portal source to modify cms managaer portlet and force it to change root folder by an xml file but where its the code? i found many java files.

                      thanks for your time and for helping this noob

                      • 8. Re: login portlet and CMS admin
                        noicangi

                        where i could find or instanciate cmsadmin portlet exclusively for a folder?

                        • 9. Re: login portlet and CMS admin
                          noicangi

                          some months ago ( febrery) i was trying to instanciate cms to create my own welcome page, now i need to instanciate CMS admin to make users have their own content repository , and also create my own database with users so i need to log them to diferent pages and portlets.

                          i need someone to guide me if i'm right in the code after and with the CMS admin


                          thanks nicolas.