Skip to content

Commit

Permalink
Merge pull request #179 from xenit-eu/package-private-abac-context
Browse files Browse the repository at this point in the history
Make AbacContext package-private to avoid misuse to retrieve the ABAC Context
  • Loading branch information
vierbergenlars authored Jun 28, 2024
2 parents 7948656 + a705240 commit ce8a797
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.contentgrid.thunx.predicates.querydsl.FieldByReflectionAccessStrategy;
import com.contentgrid.thunx.predicates.querydsl.QueryDslConverter;
import com.contentgrid.thunx.spring.data.context.AbacContext;
import com.contentgrid.thunx.spring.data.context.AbacContextSupplier;
import com.contentgrid.thunx.spring.data.querydsl.predicate.injector.resolver.OperationPredicates;
import com.contentgrid.thunx.spring.data.querydsl.predicate.injector.resolver.QuerydslPredicateResolver;
Expand All @@ -15,7 +14,7 @@
import org.springframework.util.Assert;

/**
* Resolves the QueryDSL Predicate from the Thunx {@link AbacContext} that is sent with the request
* Resolves the QueryDSL Predicate from the Thunx {@link AbacContextSupplier}
*/
@Slf4j
public class AbacQuerydslPredicateResolver implements QuerydslPredicateResolver {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.contentgrid.thunx.spring.data.context;
package com.contentgrid.thunx.spring.data.rest;

import com.contentgrid.thunx.predicates.model.ThunkExpression;

public class AbacContext {
class AbacContext {

private static ThreadLocal<ThunkExpression<Boolean>> currentAbacContext = new InheritableThreadLocal<ThunkExpression<Boolean>>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.contentgrid.thunx.spring.data.rest;

import com.contentgrid.thunx.spring.data.context.AbacContext;
import com.contentgrid.thunx.encoding.ThunkExpressionDecoder;
import com.contentgrid.thunx.predicates.model.ThunkExpression;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.contentgrid.thunx.spring.data.rest;

import com.contentgrid.thunx.encoding.ThunkExpressionDecoder;
import com.contentgrid.thunx.spring.data.context.AbacContext;
import com.contentgrid.thunx.spring.data.context.AbacContextSupplier;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
Expand Down

0 comments on commit ce8a797

Please sign in to comment.