Skip to content

Commit 5666475

Browse files
authored
Merge pull request #283 from entando/PRD-54_HIDE_BUNDLES_MENU_ENTRIES-env-var
PRD-54 HIDE_BUNDLES_MENU_ENTRIES env var
2 parents a723240 + a008193 commit 5666475

File tree

4 files changed

+57
-43
lines changed

4 files changed

+57
-43
lines changed

README.md

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,35 @@ By default the logging output in tests is minimized.
3636
The general log level is controlled by the variable `ROOT_LOG_LEVEL`, that in tests is set to `WARN` by default.
3737

3838
## Environment Variables List
39-
| Group | Name | Value [default] | Description |
40-
| :-- | :-- | :-- | :---------------- |
41-
|CDS | CDS_ENABLED | true, [false] | Enable Content Delivery Server |
42-
|| CDS_PUBLIC_URL | http://YOUR-APP-NAME-cds.YOUR-HOST-NAME/YOUR-TENANT-ID | |
43-
|| CDS_PRIVATE_URL | http://YOUR-TENANT-ID-cds-service:8080 | |
44-
|| CDS_PATH | /api/v1 ||
45-
| Keycloak/TLS | KEYCLOAK_AUTH_URL | https://YOUR-HOST-NAME/auth|
46-
|| SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI| https://YOUR-HOST-NAME/auth/realms/entando ||
47-
|| ENTANDO_APP_USE_TLS | | protocol for the redirect to keycloak login |
48-
|| ENTANDO_APP_ENGINE_EXTERNAL_PORT | | to force the port to use |
49-
|Redis server | REDIS_ACTIVE | true, [false] | to activate Redis cache management |
50-
|| REDIS_ADDRESS |URL [redis://localhost:6379]| Redis host address||
51-
|| REDIS_ADDRESSES | | for HA, insert the comma separated list of nodes |
52-
|| REDIS_MASTER_NAME | [mymaster] | To specify the name of the master node |
53-
|| REDIS_SESSION_ACTIVE | true, [false] | enable storing of HTTP sessions in the Redis cluster, REDIS_ACTIVE has to be "true" too.
54-
|| REDIS_PASSWORD | | |
55-
|| REDIS_USE_SENTINEL_EVENTS | [true], false | when Redis is active and Redis addresses is set, use Sentinel Monitoring
56-
|| REDIS_IO_THREAD_POOL_SIZE | Integer, [8] | to mitigate errors caused by missing front-end cache refresh
57-
|Solr | SOLR_ACTIVE | true, false | to activate Solr search
58-
|| SOLR_ADDRESS |[http://localhost:8983/solr] | Solr host address
59-
|| SOLR_CORE | string, [entando] | name of collection
60-
|| advancedSearch | true, false | To add the Solr config page to the CMS menu
61-
| Tomcat server | AGENT_ENABLED | true, [false] | if true, adds the agent options to tomcat
62-
|| AGENT_OPTS | javaagent:~/YOUR-JARFILE.jar, [empty] | the jar file with the agent options to use
63-
|| TOMCAT_MAX_POST_SIZE | Enter a value in bytes, [209,715,200 bytes] | to configure connector maxPostSize |
64-
|| FILE_UPLOAD_MAX_SIZE | Enter a value in bytes, [52,428,800 bytes] | to configure the application upload limit
65-
| MISC | | | |
66-
|| ENTANDO_BUNDLE_CLI_ETC | ${ENTANDO_BUNDLE_CLI_ETC}/hub/credentials | Credentials/parameters saved within JSON files under this path for ent bundle add hub command
67-
|| ENTANDO_APP_ENGINE_HEALTH_CHECK_TYPE | db.migration.strategy | [auto], skip, disabled, generate_sql | Liquibase strategy
68-
|| LOG_CONFIG_FILE_PATH | | to use the logback composable feature |
69-
|| ENTANDO_DOCKER_REGISTRY_OVERRIDE | | Deprecated-for v1 bundles, to propagate to CM for plugins |
39+
| Group | Name | Value [default] | Description |
40+
| :-- | :-- |:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
41+
|CDS | CDS_ENABLED | true, [false] | Enable Content Delivery Server |
42+
|| CDS_PUBLIC_URL | http://YOUR-APP-NAME-cds.YOUR-HOST-NAME/YOUR-TENANT-ID | |
43+
|| CDS_PRIVATE_URL | http://YOUR-TENANT-ID-cds-service:8080 | |
44+
|| CDS_PATH | /api/v1 | |
45+
| Keycloak/TLS | KEYCLOAK_AUTH_URL | https://YOUR-HOST-NAME/auth |
46+
|| SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI| https://YOUR-HOST-NAME/auth/realms/entando | |
47+
|| ENTANDO_APP_USE_TLS | | protocol for the redirect to keycloak login |
48+
|| ENTANDO_APP_ENGINE_EXTERNAL_PORT | | to force the port to use |
49+
|Redis server | REDIS_ACTIVE | true, [false] | to activate Redis cache management |
50+
|| REDIS_ADDRESS | URL [redis://localhost:6379] | Redis host address ||
51+
|| REDIS_ADDRESSES | | for HA, insert the comma separated list of nodes |
52+
|| REDIS_MASTER_NAME | [mymaster] | To specify the name of the master node |
53+
|| REDIS_SESSION_ACTIVE | true, [false] | enable storing of HTTP sessions in the Redis cluster, REDIS_ACTIVE has to be "true" too.
54+
|| REDIS_PASSWORD | | |
55+
|| REDIS_USE_SENTINEL_EVENTS | [true], false | when Redis is active and Redis addresses is set, use Sentinel Monitoring
56+
|| REDIS_IO_THREAD_POOL_SIZE | Integer, [8] | to mitigate errors caused by missing front-end cache refresh
57+
|Solr | SOLR_ACTIVE | true, false | to activate Solr search
58+
|| SOLR_ADDRESS | [http://localhost:8983/solr] | Solr host address
59+
|| SOLR_CORE | string, [entando] | name of collection
60+
|| advancedSearch | true, false | To add the Solr config page to the CMS menu
61+
| Tomcat server | AGENT_ENABLED | true, [false] | if true, adds the agent options to tomcat
62+
|| AGENT_OPTS | javaagent:~/YOUR-JARFILE.jar, [empty] | the jar file with the agent options to use
63+
|| TOMCAT_MAX_POST_SIZE | Enter a value in bytes, [209,715,200 bytes] | to configure connector maxPostSize |
64+
|| FILE_UPLOAD_MAX_SIZE | Enter a value in bytes, [52,428,800 bytes] | to configure the application upload limit
65+
| MISC | | | |
66+
|| ENTANDO_BUNDLE_CLI_ETC | ${ENTANDO_BUNDLE_CLI_ETC}/hub/credentials | Credentials/parameters saved within JSON files under this path for ent bundle add hub command
67+
|| ENTANDO_APP_ENGINE_HEALTH_CHECK_TYPE | db.migration.strategy | [auto], skip, disabled, generate_sql | Liquibase strategy
68+
|| LOG_CONFIG_FILE_PATH | | to use the logback composable feature |
69+
|| ENTANDO_DOCKER_REGISTRY_OVERRIDE | | Deprecated-for v1 bundles, to propagate to CM for plugins |
70+
|| HIDE_BUNDLES_MENU_ENTRIES | false | If true Hub and PBCs menù entries will be hidden |

admin-console/src/main/java/com/agiletec/apsadmin/system/BaseAction.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,5 +280,14 @@ public void setTenantManager(ITenantManager tenantManager) {
280280
public static final String USER_NOT_ALLOWED = "userNotAllowed";
281281

282282
private List<ActivityStreamInfo> _activityStreamInfos;
283-
283+
284+
private boolean _hideBundlesMenuEntries;
285+
286+
public boolean getHideBundlesMenuEntries() {
287+
return _hideBundlesMenuEntries;
288+
}
289+
290+
public void setHideBundlesMenuEntries(boolean _hideBundlesMenuEntries) {
291+
this._hideBundlesMenuEntries = _hideBundlesMenuEntries;
292+
}
284293
}

admin-console/src/main/resources/spring/apsadmin/commonConfig.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<property name="langManager" ref="LangManager" />
1212
<property name="authorizationManager" ref="AuthorizationManager" />
1313
<property name="componentManager" ref="ComponentManager" />
14+
<property name="hideBundlesMenuEntries"><value>${hide.bundles.menu.entries:false}</value></property>
1415
</bean>
1516

1617
<bean id="abstractBaseActionHelper" abstract="true" class="com.agiletec.apsadmin.system.BaseActionHelper">
@@ -72,4 +73,4 @@
7273
<property name="socialActivityStreamManager" ref="SocialActivityStreamManager"/>
7374
</bean>
7475

75-
</beans>
76+
</beans>

admin-console/src/main/webapp/WEB-INF/apsadmin/jsp/common/tiles-inserts/menuAppBuilderIntegration.jsp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
var params = window.location.search;
4646
window.location.search += params.length ? '&' + newParam : newParam;
4747
}
48-
}
48+
}
4949
5050
function updateLocalStorageWithLocale(locale) {
5151
// get most updated redux store
@@ -57,6 +57,8 @@
5757

5858
<wp:ifauthorized permission="superuser" var="isSuperUser" />
5959
<s:set var="appBuilderBaseURL" ><wp:info key="systemParam" paramName="appBuilderBaseURL" /></s:set>
60+
<s:set var="isHideBundlesMenuEntries" value="%{hideBundlesMenuEntries}" />
61+
6062
<ul class="list-group">
6163
<li class="list-group-item secondary-nav-item-pf">
6264
<a href='<c:out value="${appBuilderBaseURL}"/>dashboard' class="no-chevron">
@@ -222,7 +224,7 @@
222224

223225
<!-- ECR -->
224226
<wp:ifauthorized permission="enterECR" var="isEnterECR" />
225-
<c:if test="${isSuperUser || isEnterECR}">
227+
<c:if test="${(isSuperUser || isEnterECR) && !isHideBundlesMenuEntries}">
226228
<li class="list-group-item secondary-nav-item-pf">
227229
<a href='<c:out value="${appBuilderBaseURL}"/>component-repository' class="no-chevron">
228230
<span class="fa fa-th-list" data-toggle="tooltip" title="<s:text name="menu.ECR" />"></span>
@@ -232,13 +234,14 @@
232234
</c:if>
233235

234236
<!-- EPC -->
235-
<li class="list-group-item secondary-nav-item-pf menu-epc">
236-
<a href='<c:out value="${appBuilderBaseURL}"/>' onclick="window.sessionStorage.setItem('menu_open', 'epc')" class="no-chevron">
237-
<span class="fa menu-epc-icon" data-toggle="tooltip" title="<s:text name="menu.EPCs" />"></span>
238-
<span class="list-group-item-value"><s:text name="menu.EPCs" /></span>
239-
</a>
240-
</li>
241-
237+
<c:if test="${!isHideBundlesMenuEntries}">
238+
<li class="list-group-item secondary-nav-item-pf menu-epc">
239+
<a href='<c:out value="${appBuilderBaseURL}"/>' onclick="window.sessionStorage.setItem('menu_open', 'epc')" class="no-chevron">
240+
<span class="fa menu-epc-icon" data-toggle="tooltip" title="<s:text name="menu.EPCs" />"></span>
241+
<span class="list-group-item-value"><s:text name="menu.EPCs" /></span>
242+
</a>
243+
</li>
244+
</c:if>
242245
</ul>
243246

244247
<c:if test="${isSuperUser}">
@@ -276,7 +279,7 @@
276279
<span class="list-group-item-value"><s:text name="menu.settings.labelsLanguages" /></span>
277280
</a>
278281
</li>
279-
282+
280283
<li class="list-group-item">
281284
<a href='<c:out value="${appBuilderBaseURL}"/>email-config'>
282285
<span class="list-group-item-value"><s:text name="menu.settings.email" /></span>

0 commit comments

Comments
 (0)