Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create interceptor for global features #8108

Closed
hikalkan opened this issue Mar 17, 2021 · 0 comments · Fixed by #8117
Closed

Create interceptor for global features #8108

hikalkan opened this issue Mar 17, 2021 · 0 comments · Fixed by #8117

Comments

@hikalkan
Copy link
Member

hikalkan commented Mar 17, 2021

It is similar to the FeatureInterceptor, but for global features.

We have GlobalFeatureActionFilter and GlobalFeaturePageFilter, but they can work only for aspnet core controllers. They are not working for blazor server, for example. Becuase blazor server doesn't pass through these filters, but directly injects and consumes the application services.

We can create a IGlobalFeatureCheckingEnabled interface to not intercept every class, but only intercept classes implement this interface. Check IValidationEnabled and ValidationInterceptorRegistrar for a similar example. ApplicationService base class can implement this IGlobalFeatureCheckingEnabled, so only app services are intercepted. Other classes should implement IGlobalFeatureCheckingEnabled directly.

You can also use AbpCrossCuttingConcerns.IsApplied logic to not double check the features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants