Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-27155

JSON API add-company roles are not working as expected

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Inactive
    • Affects Version/s: 6.1.10 EE GA1, 6.1.20 EE GA2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Liferay Version: 6.1
      Operating System: Linux
      Application Server: Tomcat 7.0.x
      Java Virtual Machine: Java 6
      Database: MySQL 5.5

      Description

      using JSON WS api to add company instances, the default administrator can't see Add -> More Application menu.
      Detailed steps:

      1. Create three empty databases, lportal_ee, scci_ee and est_ee
      2. add the following to your portal-ext.properties
      jdbc.default.driverClassName=com.mysql.jdbc.Driver
      jdbc.default.url=jdbc:mysql://localhost/lportal_ee?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.default.username=ci
      jdbc.default.password=build

      jdbc.one.driverClassName=com.mysql.jdbc.Driver
      jdbc.one.url=jdbc:mysql://localhost/scci_ee?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.one.username=ci
      jdbc.one.password=build

      jdbc.two.driverClassName=com.mysql.jdbc.Driver
      jdbc.two.url=jdbc:mysql://localhost/est_ee?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.two.username=ci
      jdbc.two.password=build

      shard.default.name=default
      #shard.available.names=default,one,two
      shard.selector=com.liferay.portal.dao.shard.ManualShardSelector

      #json.servlet.hosts.allowed=sccionbuild.cisco.com,estonbuild.cisco.com,build-ci-agent2,127.0.0.1,SERVER_IP
      #jsonws.servlet.hosts.allowed=sccionbuild.cisco.com,estonbuild.cisco.com,build-ci-agent2,127.0.0.1,SERVER_IP
      #main.servlet.hosts.allowed=sccionbuild.cisco.com,estonbuild.cisco.com,build-ci-agent2,127.0.0.1,SERVER_IP

      spring.configs=\
      META-INF/base-spring.xml,\
      \
      META-INF/hibernate-spring.xml,\
      META-INF/infrastructure-spring.xml,\
      META-INF/management-spring.xml,\
      \
      META-INF/util-spring.xml,\
      \
      META-INF/jpa-spring.xml,\
      \
      META-INF/audit-spring.xml,\
      META-INF/cluster-spring.xml,\
      META-INF/editor-spring.xml,\
      META-INF/executor-spring.xml,\
      META-INF/jcr-spring.xml,\
      META-INF/ldap-spring.xml,\
      META-INF/messaging-core-spring.xml,\
      META-INF/messaging-misc-spring.xml,\
      META-INF/mobile-device-spring.xml,\
      META-INF/notifications-spring.xml,\
      META-INF/poller-spring.xml,\
      META-INF/rules-spring.xml,\
      META-INF/scheduler-spring.xml,\
      META-INF/scripting-spring.xml,\
      META-INF/search-spring.xml,\
      META-INF/workflow-spring.xml,\
      \
      META-INF/counter-spring.xml,\
      META-INF/mail-spring.xml,\
      META-INF/portal-spring.xml,\
      META-INF/portlet-container-spring.xml,\
      META-INF/staging-spring.xml,\
      META-INF/virtual-layouts-spring.xml,\
      \
      #META-INF/dynamic-data-source-spring.xml,\
      META-INF/shard-data-source-spring.xml,\
      #META-INF/memcached-spring.xml,\
      #META-INF/monitoring-spring.xml,\
      \
      META-INF/ext-spring.xml

      3. Make sure hosts file in the system is configured accordingly.
      4. start the server.
      5. Go to http://build-ci-agent2:8080/api/jsonws and add the first company instance sccionbuild.cisco.com
      6. Go to sccionbuild.cisco.com:8080, login as an administrator, try to click Dock Bar -> Add -> More and you will not see any protlet in this dropdown menu
      7. Go to Control Panel -> My Account -> Roles, you will find Administrator's role isn't there either.

      For more info about reproducing the issue, please refer to :
      https://cisco.webex.com/ciscosales/lsr.php?AT=pb&SP=MC&rID=60289347&rKey=bdbb5e1a250a5ea1

      We have managed to have a work around but it requires restart of the server. The client will prefer a fix.
      1. configure Liferay for sharding
      2. go to http://host:8080/api/jsonws and add a company accordingly.
      3. go to the newly added instance, login as test@instance1.
      4. go to Control Panel -> Users and Organizations; add a new user and assign it with Administrator's role.
      5. restart the server and you should be able to see the Add -> Application -> More menu with the new account.

        Attachments

          Activity

            People

            • Assignee:
              michael.saechang Michael Saechang
              Reporter:
              lulu.liu Lulu Liu (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 22 weeks, 2 days ago

                Packages

                Version Package