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:
- 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.
- Assert that "Anonymous User" is an entry in Instance Settings search results
- Assert that "Anonymous User" is NOT an entry in System Settings search results