You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by GitBox <gi...@apache.org> on 2021/04/23 09:02:58 UTC
[GitHub] [isis] andi-huber commented on a change in pull request #512: Isis 2619 : introduce new contructs in the programming model so that authorization facets run against mixin members.
andi-huber commented on a change in pull request #512:
URL: https://github.com/apache/isis/pull/512#discussion_r619061065
##########
File path: extensions/security/secman/model/src/main/java/org/apache/isis/extensions/secman/model/facets/TenantedAuthorizationFacetFactory.java
##########
@@ -78,35 +79,36 @@ public void processParams(final ProcessParameterContext processParameterContext)
FacetUtil.addFacet(createFacet(cls, facetHolder));
}
-
+
public static class QueryResultsCacheProviderHolder {
@Inject @Getter private Provider<QueryResultsCache> queryResultsCacheProvider;
}
-
+
@SuppressWarnings({ "rawtypes", "unchecked" })
private TenantedAuthorizationFacetDefault createFacet(
- final Class<?> cls,
+ final Class<?> cls,
final FacetHolder holder) {
val serviceRegistry = super.getServiceRegistry();
+ final boolean mixinClass = serviceRegistry.lookupService(SpecificationLoader.class).map(x -> x.loadSpecification(cls)).map(x -> x.isMixin()).isPresent();
Review comment:
Hi @danhaywood - to get a reference to SpecificationLoader, you can simply use
```java
val specLoader = super.getSpecificationLoader();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org