You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/07/20 08:44:12 UTC
[isis] branch master updated: ISIS-2809:
HiddenTypeFacetDerivedFromAuthorization to take actions into account
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new b293d73 ISIS-2809: HiddenTypeFacetDerivedFromAuthorization to take actions into account
b293d73 is described below
commit b293d734bd6ca2b7317f0ad79bc1078e0067eeee
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Jul 20 10:44:01 2021 +0200
ISIS-2809: HiddenTypeFacetDerivedFromAuthorization to take actions into
account
---
.../hidden/HiddenTypeFacetDerivedFromAuthorization.java | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/hidden/HiddenTypeFacetDerivedFromAuthorization.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/hidden/HiddenTypeFacetDerivedFromAuthorization.java
index 54e6367..a49c771 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/hidden/HiddenTypeFacetDerivedFromAuthorization.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/hidden/HiddenTypeFacetDerivedFromAuthorization.java
@@ -63,19 +63,14 @@ implements HiddenTypeFacet {
return null;
}
- //noinspection ConstantConditions
- if (false) {
- // not sure that we need to check that all actions
- // are hidden before inferring that the type overall is hidden.
- val hasVisibleAction = specification.streamRuntimeActions(MixedIn.INCLUDED)
- .anyMatch(act -> !AuthorizationFacet.hidesAction(act, vc));
-
- if (hasVisibleAction) {
- return null;
- }
+ val hasVisibleAction = specification.streamRuntimeActions(MixedIn.INCLUDED)
+ .anyMatch(act -> !AuthorizationFacet.hidesAction(act, vc));
+
+ if (hasVisibleAction) {
+ return null;
}
- return "All properties and collections are hidden";
+ return "All members (actions, properties and collections) are hidden";
}