Uploaded image for project: 'Workspaces'
  1. Workspaces
  2. WORKSPACES-1691

AccessController lead too many errors in logs when catalog site name is empty

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.12.0
    • None
    • None
    • None
    • 4.8.1
    • Oui

      I have an application without EP activated yet and no catalog site name in configuration parameter (workspaces.catalog.site.name)

      In logs, there is many errors about access controllers

      java.lang.IllegalArgumentException: Unknown site ''. The global Ametys configuration is invalid for the parameter 'workspaces.catalog.site.name'
          at org.ametys.plugins.workspaces.project.ProjectManager.getCatalogSiteName(ProjectManager.java:2116)
          at org.ametys.plugins.workspaces.project.rights.accesscontroller.ReportsPageAccessController.isReportPage(ReportsPageAccessController.java:284)
          at org.ametys.plugins.workspaces.project.rights.accesscontroller.ReportsPageAccessController.isSupported(ReportsPageAccessController.java:81)
          at org.ametys.core.right.RightManager._getAccessResults(RightManager.java:476)
          at org.ametys.core.right.RightManager._hasRightOrRead(RightManager.java:392)
          at org.ametys.core.right.RightManager.hasAnonymousReadAccess(RightManager.java:540) 
      java.lang.IllegalArgumentException: Unknown site ''. The global Ametys configuration is invalid for the parameter 'workspaces.catalog.site.name'
      	at org.ametys.plugins.workspaces.project.ProjectManager.getCatalogSiteName(ProjectManager.java:2116)
      	at org.ametys.plugins.workspaces.project.rights.accesscontroller.CatalogNewsAccessController._isCatalogNewsPage(CatalogNewsAccessController.java:99)
      	at org.ametys.plugins.workspaces.project.rights.accesscontroller.CatalogNewsAccessController.isSupported(CatalogNewsAccessController.java:94)
      	at org.ametys.core.right.RightManager._getAccessResults(RightManager.java:476)
      	at org.ametys.core.right.RightManager._hasRightOrRead(RightManager.java:392)
      	at org.ametys.core.right.RightManager.hasAnonymousReadAccess(RightManager.java:540)
      

      Since WORKSPACES-1368, we throw an error when catalog site name is empty or is unknown.
      Maybe the AC should not ignore this error and return false for #isSupported in this case

       

          [WORKSPACES-1691] AccessController lead too many errors in logs when catalog site name is empty

          There are no comments yet on this issue.

            ggouin Guillaume Gouin
            laurence Laurence Aumeunier
            Guillaume Gouin Guillaume Gouin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: