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

As a developer, I would like to easily restrict configuration visibility to the declared scope

    Details

      Description

      Currently, when a configuration is marked as COMPANY or GROUP scope, it will by default render at the defined scope's portlet, but also in the portlets of all broader scopes.

      Currently this can be limited by implementing a ConfigurationVisibilityController, but it is a lot of overhead just for limiting the rendering to one portlet.

      This can easily be accomplished by the introduction of another attribute in the ExtendedObjectClassDefinition annotation.

      /**
       * Whether or not the configuration's visibility will be limited to the
       * declared scope.
       *
       * If true, the configuration will only be visible at the declared scope.
       *
       * If false, the configuration will be visible at the declared scope and all
       * broader scopes, unless otherwise restricted by a
       * ConfigurationVisibilityController.
       *
       * The default value is false.
       */
      public boolean strictScope() default false;
      

      The default value of this annotation is "false", which defaults to the current behavior.

      If set to "true", the config will only render at the declared scope. This is never necessary if the configuration is SYSTEM scoped, since it is already only visible at the broadest possible scope.

      Steps for QA to reproduce:

      1. Assert that in the source code, the file modules/apps/user-associated-data/user-associated-data-web/src/main/java/com/liferay/user/associated/data/web/internal/configuration/admin/display/AnonymousUserConfigurationVisibilityController.java does not exist. Before this change, this file was responsible for only allowing the AnonymousUserConfiguration to render in the Instance Settings portlet.
      2. Assert that "Anonymous User" is an entry in Instance Settings search results
      3. Assert that "Anonymous User" is NOT an entry in System Settings search results

        Attachments

          Activity

            People

            Assignee:
            patricia.perez Patricia Perez
            Reporter:
            drew.brokke Drew Brokke
            Engineering Assignee:
            Drew Brokke
            Recent user:
            Sophia Zhang
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                7.4.13 DXP GA1
                Master