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

Invalid SQL is generated at InlineSQLHelperImpl with some non-admin users

    Details

      Description

      Steps to reproduce

      1. Create a new site, called "sitelps53132".
      2. Add a page to that "sitelps53132" site
      3. Create a new regular role called "rolelps53132" with following permissions:
      • Permissions for all sites:
        • Inside Control Panel section:
          Sites > Site: Configure Applications   ===>  All Sites
          Sites > Site: Manage Pages   ===>  All Sites
          
        • Inside Site Admin. => Applications section:
          Documents and Media: Add to Page   ===>  All Sites
          Documents and Media Display: Add to Page   ===>  All Sites
          Documents and Media Display: View   ===>  All Sites
          
      • Permissions for only "Global" and "sitelps53132":
        • Inside Site Admin. => Applications section:
          Documents and Media: View   ===>  Global, sitelps53132
          Documents and Media > Document: View   ===>  Global, sitelps53132
          Documents and Media > Document Type: View   ===>  Global, sitelps53132
          Documents and Media > Documents: View   ===>  Global, sitelps53132
          Documents and Media > Documents Folder: View   ===>  Global, sitelps53132
          
      1. Create a non-admin user called "userlps53132" and add him to both site "sitelps53132" and role "rolelps53132"
      2. Login with user "userlps53132"
      3. Open site "sitelps53132"
      4. Click at "add application" button at left side of page ( "+" button)
      • Expected behavior: the left panel with all aplications will be shown
      • Wrong behavior: the left panel will be shown blank, and a org.hibernate.exception.SQLGrammarException exception will be thrown at liferay log

      The SQL generated at InlineSQLHelperImpl.replacePermissionCheckJoin has a empty "()" clause:

      ....peId)) AND (() OR (dlFileEn.....

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jorge.diaz Jorge Diaz
                Reporter:
                jorge.diaz Jorge Diaz
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  7.0.0 M4